File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11//! Tests deep sleep
22//!
33//! Enables multiple deep sleep wakeup sources and then enter deep sleep.
4- //! There is no loop here, since the program will not continue after deep sleep.
4+ //! There is no loop here, since the program will not continue after deep sleep,
5+ //! it always starts from the beginning after a deep sleep wake-up.
56//! For ESP32c3, only timer wakeup is supported.
67//! The program starts by printing reset and wakeup reason, since the deep
78//! sleep effectively ends the program, this is how we get information about
Original file line number Diff line number Diff line change 44//! Prints wakeup reason and sleep time on wakeup.
55
66use core:: time:: Duration ;
7- use esp_idf_hal:: gpio:: { self , PinDriver } ;
7+ use esp_idf_hal:: gpio:: { self , AnyIOPin , PinDriver } ;
88use esp_idf_hal:: peripherals:: Peripherals ;
99use esp_idf_hal:: prelude:: * ;
1010use esp_idf_hal:: reset:: WakeupReason ;
@@ -87,7 +87,7 @@ fn main() -> anyhow::Result<()> {
8787 pins : EmptyGpioWakeupPins :: chain ( gpio_pin0) . chain ( gpio_pin1) ,
8888 } ) ;
8989 #[ cfg( not( any( esp32, esp32c3, esp32s2, esp32s3) ) ) ]
90- let gpio_wakeup: Option < GpioWakeup > = None ;
90+ let gpio_wakeup = None :: < GpioWakeup > ;
9191
9292 // UART definitions
9393 let config = Config :: new ( ) . baudrate ( Hertz ( 115_200 ) ) ;
@@ -96,8 +96,8 @@ fn main() -> anyhow::Result<()> {
9696 peripherals. uart0 ,
9797 peripherals. pins . gpio4 ,
9898 peripherals. pins . gpio3 ,
99- Option :: < gpio :: Gpio0 > :: None ,
100- Option :: < gpio :: Gpio1 > :: None ,
99+ None :: < AnyIOPin > ,
100+ None :: < AnyIOPin > ,
101101 & config,
102102 ) ?;
103103 #[ cfg( any( esp32s2, esp32s3) ) ]
You can’t perform that action at this time.
0 commit comments