mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
make the susres test a bit more difficult to pass
This commit is contained in:
parent
19667800cb
commit
e97c99b435
1 changed files with 3 additions and 2 deletions
|
|
@ -87,11 +87,12 @@ impl<'a> ShellCmdApi<'a> for Sleep {
|
||||||
let llio = llio::Llio::new(&xns);
|
let llio = llio::Llio::new(&xns);
|
||||||
let susres = susres::Susres::new_without_hook(&xns).unwrap();
|
let susres = susres::Susres::new_without_hook(&xns).unwrap();
|
||||||
let ticktimer = ticktimer_server::Ticktimer::new().unwrap();
|
let ticktimer = ticktimer_server::Ticktimer::new().unwrap();
|
||||||
|
let trng = trng::Trng::new(&xns).unwrap();
|
||||||
ticktimer.sleep_ms(1500).unwrap();
|
ticktimer.sleep_ms(1500).unwrap();
|
||||||
let mut iters = 0;
|
let mut iters = 0;
|
||||||
loop {
|
loop {
|
||||||
log::info!("suspend/resume cycle: {}", iters);
|
log::info!("suspend/resume cycle: {}", iters);
|
||||||
llio.set_wakeup_alarm(4).unwrap();
|
llio.set_wakeup_alarm(5).unwrap();
|
||||||
ticktimer.sleep_ms(1000).unwrap();
|
ticktimer.sleep_ms(1000).unwrap();
|
||||||
match susres.initiate_suspend() {
|
match susres.initiate_suspend() {
|
||||||
Err(xous::Error::Timeout) => {
|
Err(xous::Error::Timeout) => {
|
||||||
|
|
@ -102,7 +103,7 @@ impl<'a> ShellCmdApi<'a> for Sleep {
|
||||||
log::error!("Unknown error on suspend: {:?}", e);
|
log::error!("Unknown error on suspend: {:?}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ticktimer.sleep_ms(7000).unwrap();
|
ticktimer.sleep_ms(3000 + (trng.get_u32().unwrap() % 7000) as usize).unwrap();
|
||||||
iters += 1;
|
iters += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue