enable deepsleep and gpio1 + timer wake

This commit is contained in:
2025-09-26 22:07:48 +02:00
parent 7fc8d0c882
commit 76f59b093d
7 changed files with 79 additions and 82 deletions

View File

@@ -2,7 +2,7 @@ use crate::alloc::boxed::Box;
use crate::hal::esp::Esp;
use crate::hal::rtc::{BackupHeader, RTCModuleInteraction};
use crate::hal::water::TankSensor;
use crate::hal::{BoardInteraction, FreePeripherals, Sensor};
use crate::hal::{BoardInteraction, FreePeripherals, Sensor, TIME_ACCESS};
use crate::fat_error::{FatError, FatResult};
use crate::{
bail,
@@ -95,7 +95,8 @@ impl<'a> BoardInteraction<'a> for Initial<'a> {
}
async fn deep_sleep(&mut self, duration_in_ms: u64) -> ! {
self.esp.deep_sleep(duration_in_ms).await;
let rtc = TIME_ACCESS.get().await.lock().await;
self.esp.deep_sleep(duration_in_ms, rtc);
}
fn is_day(&self) -> bool {
false