This repository was archived by the owner on May 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ repository = "https://github.com/esp-rs/esp-println"
1111license = " MIT OR Apache-2.0"
1212
1313[dependencies ]
14- log = { version = " 0.4.17" , optional = true }
14+ log = { version = " 0.4.17" , optional = true }
1515
1616[features ]
1717default = [" uart" ]
1818
1919# You must enable exactly 1 of the below features to support the correct chip:
2020esp32 = []
21+ esp32c2 = []
2122esp32c3 = []
2223esp32s2 = []
2324esp32s3 = []
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ fn main() {
22 // Ensure that only a single chip is specified
33 let chip_features = [
44 cfg ! ( feature = "esp32" ) ,
5+ cfg ! ( feature = "esp32c2" ) ,
56 cfg ! ( feature = "esp32c3" ) ,
67 cfg ! ( feature = "esp32s2" ) ,
78 cfg ! ( feature = "esp32s3" ) ,
@@ -29,9 +30,7 @@ fn main() {
2930
3031 // Ensure that, if the `jtag_serial` communication method feature is
3132 // enabled, either the `esp32c3` or `esp32s3` chip feature is enabled.
32- if cfg ! ( feature = "jtag_serial" )
33- && ( cfg ! ( feature = "esp32" ) || cfg ! ( feature = "esp32s2" ) || cfg ! ( feature = "esp8266" ) )
34- {
33+ if cfg ! ( feature = "jtag_serial" ) && !( cfg ! ( feature = "esp32c3" ) || cfg ! ( feature = "esp32s3" ) ) {
3534 panic ! ( "The `jtag_serial` feature is only supported by the ESP32-C3 and ESP32-S3" ) ;
3635 }
3736}
Original file line number Diff line number Diff line change 11#![ no_std]
2- #![ allow( dead_code) ]
32
43#[ macro_export]
54macro_rules! println {
@@ -26,6 +25,8 @@ pub mod logger;
2625
2726#[ cfg( feature = "esp32" ) ]
2827const UART_TX_ONE_CHAR : usize = 0x40009200 ;
28+ #[ cfg( feature = "esp32c2" ) ]
29+ const UART_TX_ONE_CHAR : usize = 0x40000058 ;
2930#[ cfg( feature = "esp32c3" ) ]
3031const UART_TX_ONE_CHAR : usize = 0x40000068 ;
3132#[ cfg( feature = "esp32s3" ) ]
You can’t perform that action at this time.
0 commit comments