mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
convert test routine to use susres api to enter sleep
This commit is contained in:
parent
934d6e1082
commit
d261090f31
2 changed files with 4 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ ux-api = { path = "../../libs/ux-api", optional = true }
|
|||
pddb = { path = "../pddb", optional = true }
|
||||
xous-swapper = { path = "../xous-swapper", optional = true }
|
||||
bytemuck = "1.24.0"
|
||||
susres = { package = "xous-api-susres", version = "0.9.66" }
|
||||
|
||||
# pddb testing
|
||||
rand = { version = "0.8.5", features = ["getrandom"], optional = true }
|
||||
|
|
|
|||
|
|
@ -128,14 +128,15 @@ impl<'a> ShellCmdApi<'a> for Test {
|
|||
"keepon" => {
|
||||
todo!("Fix this to use DCDC2 for keepon (as per baosec v2)");
|
||||
}
|
||||
#[cfg(not(feature = "hosted-baosec"))]
|
||||
"wfi" => {
|
||||
let gfx = ux_api::service::gfx::Gfx::new(&_env.xns).unwrap();
|
||||
log::info!("turn off display");
|
||||
gfx.set_power(false).unwrap();
|
||||
log::info!("display off");
|
||||
let hal = bao1x_hal_service::Hal::new();
|
||||
let susres = susres::Susres::new_without_hook(&_env.xns).unwrap();
|
||||
log::info!("initiating wfi from test shell...");
|
||||
hal.wfi();
|
||||
susres.initiate_suspend().unwrap();
|
||||
log::info!("waiting after WFI return (system will be in WFI)");
|
||||
_env.ticktimer.sleep_ms(100).ok();
|
||||
log::info!("turn on display");
|
||||
|
|
|
|||
Loading…
Reference in a new issue