mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
update to latest standards in server templating.
This commit is contained in:
parent
4cfd835c0c
commit
d6e137c9f9
1 changed files with 7 additions and 3 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
#![cfg_attr(target_os = "none", no_main)]
|
#![cfg_attr(target_os = "none", no_main)]
|
||||||
|
|
||||||
mod api;
|
mod api;
|
||||||
|
use api::*;
|
||||||
|
|
||||||
use num_traits::FromPrimitive;
|
use num_traits::FromPrimitive;
|
||||||
|
|
||||||
|
|
@ -100,14 +101,17 @@ fn xmain() -> ! {
|
||||||
loop {
|
loop {
|
||||||
let msg = xous::receive_message(codec_sid).unwrap();
|
let msg = xous::receive_message(codec_sid).unwrap();
|
||||||
match FromPrimitive::from_usize(msg.body.id()) {
|
match FromPrimitive::from_usize(msg.body.id()) {
|
||||||
Some(api::Opcode::SuspendResume) => xous::msg_scalar_unpack!(msg, token, _, _, _, {
|
Some(Opcode::SuspendResume) => xous::msg_scalar_unpack!(msg, token, _, _, _, {
|
||||||
codec.suspend();
|
codec.suspend();
|
||||||
susres.suspend_until_resume(token).expect("couldn't execute suspend/resume");
|
susres.suspend_until_resume(token).expect("couldn't execute suspend/resume");
|
||||||
codec.resume();
|
codec.resume();
|
||||||
}),
|
}),
|
||||||
|
Some(Opcode::Quit) => {
|
||||||
|
log::warn!("Quit received, goodbye world!");
|
||||||
|
break;
|
||||||
|
},
|
||||||
None => {
|
None => {
|
||||||
log::error!("couldn't convert opcode");
|
log::error!("couldn't convert opcode: {:?}", msg);
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue