use rom linked functions for pin keeping
This commit is contained in:
@@ -336,7 +336,7 @@ impl Esp<'_> {
|
||||
}
|
||||
pub(crate) fn clear_low_voltage_in_cycle(&mut self) {
|
||||
unsafe {
|
||||
LOW_VOLTAGE_DETECTED = 1;
|
||||
LOW_VOLTAGE_DETECTED = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -547,7 +547,8 @@ impl Esp<'_> {
|
||||
if duration_in_ms == 0 {
|
||||
software_reset();
|
||||
} else {
|
||||
let timer = TimerWakeupSource::new(core::time::Duration::from_millis(duration_in_ms));
|
||||
///let timer = TimerWakeupSource::new(core::time::Duration::from_millis(duration_in_ms));
|
||||
let timer = TimerWakeupSource::new(core::time::Duration::from_millis(5000));
|
||||
let mut wake_pins: [(&mut dyn RtcPinWithResistors, WakeupLevel); 1] = [(&mut self.wake_gpio1, WakeupLevel::Low)];
|
||||
let ext1 = esp_hal::rtc_cntl::sleep::Ext1WakeupSource::new(&mut wake_pins);
|
||||
rtc.sleep_deep(&[&timer, &ext1]);
|
||||
|
Reference in New Issue
Block a user