fix hosted mode warnings

This commit is contained in:
bunnie 2026-04-22 12:07:49 +08:00
parent 8f16270efa
commit a40eba8199
3 changed files with 8 additions and 4 deletions

View file

@ -431,6 +431,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
let mut bw_thresh: u8 = 128;
let mut qr_request: Option<xous::MessageEnvelope> = None;
let mut kbd_listeners: Vec<(CID, usize)> = Vec::new();
#[allow(unused_mut)]
let mut orientation = DisplayOrientation::Normal;
loop {
if !is_panic.load(Ordering::Relaxed) {
@ -521,6 +522,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
}
GfxOpcode::KeyPress => {
if let Some(scalar) = msg.body.scalar_message() {
#[cfg(not(feature = "hosted-baosec"))]
let k = char::from_u32(scalar.arg1 as u32).unwrap_or('\u{0000}');
#[cfg(not(feature = "hosted-baosec"))]
// ignore accelerometer reports
@ -975,6 +977,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
xous::terminate_process(0)
}
#[allow(unused_variables)]
fn display_timeout_handler(udma_global: &UdmaGlobal, display: &mut Oled128x128) {
log::info!("resetting display spim block");
#[cfg(feature = "board-baosec")]

View file

@ -134,6 +134,11 @@ impl<'a> Oled128x128 {
unimplemented!("devboot feature does not exist on this platform");
}
pub fn flip_vertical(&mut self, _flip: bool) -> Result<(), xous::Error> {
log::warn!("flipping not implemented");
Ok(())
}
pub fn stash(&mut self) { self.stash.copy_from_slice(&self.buffer); }
pub fn pop(&mut self) -> Result<(), xous::Error> {

View file

@ -134,8 +134,4 @@ fn main() {
}
}
}
xns.unregister_server(sid).unwrap();
xous::destroy_server(sid).unwrap();
log::trace!("quitting");
xous::terminate_process(0)
}