This commit is contained in:
Priec
2025-12-14 15:16:24 +01:00
parent 20dfdbc335
commit 053cba171d
4 changed files with 30 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ pub enum LowPowerCmd {
Standby, // 3
Shutdown, // 4
StopMode(StopModeConfig),
Sleep,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, defmt::Format)]
@@ -62,6 +63,7 @@ pub async fn uart_cmd_task() {
[3] Standby minimal\r\n\
[4] Shutdown\r\n\
[5] Stop mode (0-3)\r\n\
[6] Sleep mode (WFI or WFE)\r\n\
"
).await;
embassy_time::Timer::after(embassy_time::Duration::from_millis(8)).await;
@@ -112,7 +114,8 @@ pub async fn uart_cmd_task() {
_ => { print_menu().await; continue; }
};
CMD_CH.send(LowPowerCmd::StopMode(StopModeConfig { mode: stop_mode, entry })).await;
}
},
b'6' => CMD_CH.send(LowPowerCmd::Sleep).await,
_ => { print_menu().await; continue; }
}
}