mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
try to improve suspend/resume stability
This commit is contained in:
parent
d020bda4be
commit
fbe6aad8bb
2 changed files with 23 additions and 5 deletions
|
|
@ -489,7 +489,7 @@ fn keyboard_service() {
|
|||
),
|
||||
)
|
||||
.unwrap_or_else(|_| {
|
||||
log::info!("Input overflow, dropping keys!");
|
||||
log::info!("Input overflow to {}, dropping keys!", conn);
|
||||
xous::Result::Ok
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -379,7 +379,14 @@ fn susres_service() {
|
|||
}),
|
||||
Some(Opcode::Quit) => break,
|
||||
Some(Opcode::PlatformSpecific) => {
|
||||
msg_blocking_scalar_unpack!(msg, op, _arg2, _arg3, _arg4, {
|
||||
if let xous::Message::BlockingScalar(xous::ScalarMessage {
|
||||
id: _id,
|
||||
arg1: op,
|
||||
arg2: _arg2,
|
||||
arg3: _arg3,
|
||||
arg4: _arg4,
|
||||
}) = msg.body
|
||||
{
|
||||
let platform_op = FromPrimitive::from_usize(op);
|
||||
match platform_op {
|
||||
Some(ClockOp::GetVco) => {
|
||||
|
|
@ -403,15 +410,26 @@ fn susres_service() {
|
|||
Some(ClockOp::GetPer) => {
|
||||
xous::return_scalar(msg.sender, clk_mgr.perclk as usize).unwrap()
|
||||
}
|
||||
_ => panic!("Incorrect PlatformOp"),
|
||||
}
|
||||
}
|
||||
if let xous::Message::Scalar(xous::ScalarMessage {
|
||||
id: _id,
|
||||
arg1: op,
|
||||
arg2: _arg2,
|
||||
arg3: _arg3,
|
||||
arg4: _arg4,
|
||||
}) = msg.body
|
||||
{
|
||||
let platform_op = FromPrimitive::from_usize(op);
|
||||
match platform_op {
|
||||
Some(ClockOp::DeepSleep) => {
|
||||
log::info!("entering deep sleep");
|
||||
clk_mgr.deep_sleep();
|
||||
xous::return_scalar(msg.sender, 1).ok();
|
||||
// system is shut down after this point, no code runs
|
||||
}
|
||||
_ => panic!("Incorrect PlatformOp"),
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
None => {
|
||||
log::error!("couldn't convert opcode");
|
||||
|
|
|
|||
Loading…
Reference in a new issue