Skip to content

Commit e3408f5

Browse files
committed
fix more emulated modes
1 parent db4d70e commit e3408f5

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

services/bao-video/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,9 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
912912

913913
fn display_timeout_handler(udma_global: &UdmaGlobal, display: &mut Oled128x128) {
914914
log::info!("resetting display spim block");
915-
udma_global.reset(PeriphId::from(bao1x_hal::board::get_display_pins().0));
916-
display.reinit_spi();
915+
#[cfg(feature = "board-baosec")]
916+
{
917+
udma_global.reset(PeriphId::from(bao1x_hal::board::get_display_pins().0));
918+
display.reinit_spi();
919+
}
917920
}

services/bao1x-emu/src/display.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl<'a> Oled128x128 {
126126

127127
pub fn screen_size(&self) -> Point { Point::new(WIDTH, LINES) }
128128

129-
pub fn redraw(&mut self) { self.draw(); }
129+
pub fn redraw(&mut self) -> Result<(), xous::Error> { self.draw() }
130130

131131
pub fn blit_screen(&mut self, bmp: &[u32]) { self.buffer.copy_from_slice(bmp); }
132132

@@ -136,18 +136,19 @@ impl<'a> Oled128x128 {
136136

137137
pub fn stash(&mut self) { self.stash.copy_from_slice(&self.buffer); }
138138

139-
pub fn pop(&mut self) {
139+
pub fn pop(&mut self) -> Result<(), xous::Error> {
140140
self.buffer.copy_from_slice(&self.stash);
141-
self.redraw();
141+
self.redraw()
142142
}
143143

144-
pub fn send_command<'b, U>(&'b mut self, _cmd: U)
144+
pub fn send_command<'b, U>(&'b mut self, _cmd: U) -> Result<(), xous::Error>
145145
where
146146
U: IntoIterator<Item = u8> + 'b,
147147
{
148+
Ok(())
148149
}
149150

150-
pub fn init(&mut self) {}
151+
pub fn init(&mut self) -> Result<(), xous::Error> { Ok(()) }
151152
}
152153

153154
impl FrameBuffer for Oled128x128 {

services/keystore/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ impl Keystore {
234234
}
235235
}
236236

237+
#[cfg(feature = "bao1x")]
237238
pub fn set_ephemeral_key(&self, key: &[u8; bao1x_hal::buram::KEY_LEN]) -> Result<(), xous::Error> {
238239
let offset = 0;
239240
xous::send_message(
@@ -262,6 +263,7 @@ impl Keystore {
262263
.map(|_| ())
263264
}
264265

266+
#[cfg(feature = "bao1x")]
265267
pub fn get_ephemeral_key(&self) -> Result<[u8; bao1x_hal::buram::KEY_LEN], xous::Error> {
266268
let mut key = [0u8; bao1x_hal::buram::KEY_LEN];
267269
let offset = 0;

services/keystore/src/platform/hosted.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ pub fn keystore(sid: SID) -> ! {
133133
}
134134
buffer.replace(kwp).unwrap();
135135
}
136-
Opcode::EphemeralOp => {
136+
Opcode::Ephemeral => {
137137
todo!()
138138
}
139139
_ => {

0 commit comments

Comments
 (0)