mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
fix more emulated modes
This commit is contained in:
parent
db4d70e5ff
commit
e3408f5346
4 changed files with 14 additions and 8 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<Item = u8> + 'b,
|
||||
{
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn init(&mut self) {}
|
||||
pub fn init(&mut self) -> Result<(), xous::Error> { Ok(()) }
|
||||
}
|
||||
|
||||
impl FrameBuffer for Oled128x128 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ pub fn keystore(sid: SID) -> ! {
|
|||
}
|
||||
buffer.replace(kwp).unwrap();
|
||||
}
|
||||
Opcode::EphemeralOp => {
|
||||
Opcode::Ephemeral => {
|
||||
todo!()
|
||||
}
|
||||
_ => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue