Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindnetland committed Sep 14, 2023
1 parent f43ee14 commit 8e2f7b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion examples/deep_sleep.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//! Tests deep sleep
//!
//! Enables multiple deep sleep wakeup sources and then enter deep sleep.
//! There is no loop here, since the program will not continue after deep sleep.
//! There is no loop here, since the program will not continue after deep sleep,
//! it always starts from the beginning after a deep sleep wake-up.
//! For ESP32c3, only timer wakeup is supported.
//! The program starts by printing reset and wakeup reason, since the deep
//! sleep effectively ends the program, this is how we get information about
Expand Down
8 changes: 4 additions & 4 deletions examples/light_sleep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! Prints wakeup reason and sleep time on wakeup.

use core::time::Duration;
use esp_idf_hal::gpio::{self, PinDriver};
use esp_idf_hal::gpio::{self, PinDriver, AnyIOPin};
use esp_idf_hal::peripherals::Peripherals;
use esp_idf_hal::prelude::*;
use esp_idf_hal::reset::WakeupReason;
Expand Down Expand Up @@ -87,7 +87,7 @@ fn main() -> anyhow::Result<()> {
pins: EmptyGpioWakeupPins::chain(gpio_pin0).chain(gpio_pin1),
});
#[cfg(not(any(esp32, esp32c3, esp32s2, esp32s3)))]
let gpio_wakeup: Option<GpioWakeup> = None;
let gpio_wakeup = None::<GpioWakeup>;

// UART definitions
let config = Config::new().baudrate(Hertz(115_200));
Expand All @@ -96,8 +96,8 @@ fn main() -> anyhow::Result<()> {
peripherals.uart0,
peripherals.pins.gpio4,
peripherals.pins.gpio3,
Option::<gpio::Gpio0>::None,
Option::<gpio::Gpio1>::None,
None::<AnyIOPin>,
None::<AnyIOPin>,
&config,
)?;
#[cfg(any(esp32s2, esp32s3))]
Expand Down

0 comments on commit 8e2f7b0

Please sign in to comment.