mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
gate off incompatible features for hosted mode
This commit is contained in:
parent
720680a931
commit
84a083017c
1 changed files with 6 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ mod gfx;
|
||||||
#[cfg(feature = "board-baosec")]
|
#[cfg(feature = "board-baosec")]
|
||||||
mod panic;
|
mod panic;
|
||||||
mod qr;
|
mod qr;
|
||||||
|
#[cfg(not(feature = "hosted-baosec"))]
|
||||||
mod qr_warmup;
|
mod qr_warmup;
|
||||||
#[cfg(feature = "gfx-testing")]
|
#[cfg(feature = "gfx-testing")]
|
||||||
mod testing;
|
mod testing;
|
||||||
|
|
@ -199,7 +200,9 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
||||||
}
|
}
|
||||||
|
|
||||||
// respond to keyboard presses - needed to abort QR code mode
|
// respond to keyboard presses - needed to abort QR code mode
|
||||||
|
#[cfg(not(feature = "hosted-baosec"))]
|
||||||
let kbd = bao1x_api::keyboard::Keyboard::new(&xns).unwrap();
|
let kbd = bao1x_api::keyboard::Keyboard::new(&xns).unwrap();
|
||||||
|
#[cfg(not(feature = "hosted-baosec"))]
|
||||||
kbd.register_listener(SERVER_NAME_GFX, GfxOpcode::KeyPress.to_u32().unwrap() as usize);
|
kbd.register_listener(SERVER_NAME_GFX, GfxOpcode::KeyPress.to_u32().unwrap() as usize);
|
||||||
|
|
||||||
// ---- camera initialization
|
// ---- camera initialization
|
||||||
|
|
@ -344,6 +347,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
||||||
num_traits::FromPrimitive::from_usize(msg.body.id()).unwrap_or(GfxOpcode::InvalidCall);
|
num_traits::FromPrimitive::from_usize(msg.body.id()).unwrap_or(GfxOpcode::InvalidCall);
|
||||||
log::debug!("{:?}", opcode);
|
log::debug!("{:?}", opcode);
|
||||||
match opcode {
|
match opcode {
|
||||||
|
#[cfg(not(feature = "hosted-baosec"))]
|
||||||
GfxOpcode::AcquireQr => {
|
GfxOpcode::AcquireQr => {
|
||||||
if qr_request.is_none() {
|
if qr_request.is_none() {
|
||||||
display.stash(); // save a copy of the UI
|
display.stash(); // save a copy of the UI
|
||||||
|
|
@ -385,6 +389,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
||||||
}
|
}
|
||||||
// if qr_request is already pending, ignore any new acquisition requests
|
// if qr_request is already pending, ignore any new acquisition requests
|
||||||
}
|
}
|
||||||
|
#[cfg(not(feature = "hosted-baosec"))]
|
||||||
GfxOpcode::KeyPress => {
|
GfxOpcode::KeyPress => {
|
||||||
// any key press will abort QR acquisition by taking the qr_request. If it's already None,
|
// any key press will abort QR acquisition by taking the qr_request. If it's already None,
|
||||||
// the keypress is just ignored.
|
// the keypress is just ignored.
|
||||||
|
|
@ -476,6 +481,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
||||||
};
|
};
|
||||||
response.replace(acquisition).unwrap();
|
response.replace(acquisition).unwrap();
|
||||||
display.pop();
|
display.pop();
|
||||||
|
#[cfg(not(feature = "hosted-baosec"))]
|
||||||
hal.set_preemption(true);
|
hal.set_preemption(true);
|
||||||
} else {
|
} else {
|
||||||
log::info!("meta: {:?}", meta);
|
log::info!("meta: {:?}", meta);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue