diff --git a/services/bao-video/src/main.rs b/services/bao-video/src/main.rs index 4400ddab8..92d034e7b 100644 --- a/services/bao-video/src/main.rs +++ b/services/bao-video/src/main.rs @@ -912,6 +912,9 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! { fn display_timeout_handler(udma_global: &UdmaGlobal, display: &mut Oled128x128) { log::info!("resetting display spim block"); - udma_global.reset(PeriphId::from(bao1x_hal::board::get_display_pins().0)); - display.reinit_spi(); + #[cfg(feature = "board-baosec")] + { + udma_global.reset(PeriphId::from(bao1x_hal::board::get_display_pins().0)); + display.reinit_spi(); + } } diff --git a/services/bao1x-emu/src/display.rs b/services/bao1x-emu/src/display.rs index 864d217ef..cc9ff2c34 100644 --- a/services/bao1x-emu/src/display.rs +++ b/services/bao1x-emu/src/display.rs @@ -126,7 +126,7 @@ impl<'a> Oled128x128 { pub fn screen_size(&self) -> Point { Point::new(WIDTH, LINES) } - pub fn redraw(&mut self) { self.draw(); } + pub fn redraw(&mut self) -> Result<(), xous::Error> { self.draw() } pub fn blit_screen(&mut self, bmp: &[u32]) { self.buffer.copy_from_slice(bmp); } @@ -136,18 +136,19 @@ impl<'a> Oled128x128 { pub fn stash(&mut self) { self.stash.copy_from_slice(&self.buffer); } - pub fn pop(&mut self) { + pub fn pop(&mut self) -> Result<(), xous::Error> { self.buffer.copy_from_slice(&self.stash); - self.redraw(); + self.redraw() } - pub fn send_command<'b, U>(&'b mut self, _cmd: U) + pub fn send_command<'b, U>(&'b mut self, _cmd: U) -> Result<(), xous::Error> where U: IntoIterator + 'b, { + Ok(()) } - pub fn init(&mut self) {} + pub fn init(&mut self) -> Result<(), xous::Error> { Ok(()) } } impl FrameBuffer for Oled128x128 { diff --git a/services/keystore/src/lib.rs b/services/keystore/src/lib.rs index 18b8eb9db..68cc0c8fa 100644 --- a/services/keystore/src/lib.rs +++ b/services/keystore/src/lib.rs @@ -234,6 +234,7 @@ impl Keystore { } } + #[cfg(feature = "bao1x")] pub fn set_ephemeral_key(&self, key: &[u8; bao1x_hal::buram::KEY_LEN]) -> Result<(), xous::Error> { let offset = 0; xous::send_message( @@ -262,6 +263,7 @@ impl Keystore { .map(|_| ()) } + #[cfg(feature = "bao1x")] pub fn get_ephemeral_key(&self) -> Result<[u8; bao1x_hal::buram::KEY_LEN], xous::Error> { let mut key = [0u8; bao1x_hal::buram::KEY_LEN]; let offset = 0; diff --git a/services/keystore/src/platform/hosted.rs b/services/keystore/src/platform/hosted.rs index e5b3ff2ff..23ec9c6af 100644 --- a/services/keystore/src/platform/hosted.rs +++ b/services/keystore/src/platform/hosted.rs @@ -133,7 +133,7 @@ pub fn keystore(sid: SID) -> ! { } buffer.replace(kwp).unwrap(); } - Opcode::EphemeralOp => { + Opcode::Ephemeral => { todo!() } _ => {