modernize opcode debug on PDDB

This commit is contained in:
bunnie 2023-12-07 18:41:51 +08:00
parent 0047913a2d
commit 0a0ac292c3

View file

@ -632,8 +632,9 @@ fn wrapped_main() -> ! {
Opcode::SuspendResume as u32, my_cid).expect("couldn't create suspend/resume object");
loop {
let mut msg = xous::receive_message(pddb_sid).unwrap();
// log::error!("got msg: {:x?}", msg);
match FromPrimitive::from_usize(msg.body.id() & 0xffff).unwrap_or(Opcode::InvalidOpcode) {
let op: Opcode = FromPrimitive::from_usize(msg.body.id() & 0xffff).unwrap_or(Opcode::InvalidOpcode);
log::debug!("{:x?}", op);
match op {
Opcode::SuspendResume => xous::msg_scalar_unpack!(msg, token, _, _, _, {
basis_cache.suspend(&mut pddb_os);
susres.suspend_until_resume(token).expect("couldn't execute suspend/resume");