sleep
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user