mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
mirror code structure from hosted mode
This commit is contained in:
parent
317bc6a9fd
commit
67e501328d
1 changed files with 21 additions and 21 deletions
|
|
@ -372,14 +372,31 @@ impl<'a> Oled128x128<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn set_data(&self) { self.iox.set_gpio_pin_value(self.cd_port, self.cd_pin, IoxValue::High); }
|
||||
|
||||
fn set_command(&self) { self.iox.set_gpio_pin_value(self.cd_port, self.cd_pin, IoxValue::Low); }
|
||||
|
||||
pub fn buffer_mut(&mut self) -> &mut ux_api::platform::FbRaw { &mut self.buffer }
|
||||
|
||||
pub fn buffer(&self) -> &ux_api::platform::FbRaw { &self.buffer }
|
||||
|
||||
pub fn screen_size(&self) -> Point { Point::new(WIDTH, LINES) }
|
||||
|
||||
pub fn redraw(&mut self) { self.draw(); }
|
||||
|
||||
pub fn blit_screen(&mut self, bmp: &[u32]) { self.buffer.copy_from_slice(bmp); }
|
||||
|
||||
pub fn set_devboot(&mut self, _ena: bool) {
|
||||
unimplemented!("devboot feature does not exist on this platform");
|
||||
}
|
||||
|
||||
pub fn stash(&mut self) { self.stash.copy_from_slice(&self.buffer); }
|
||||
|
||||
pub fn pop(&mut self) {
|
||||
self.buffer.copy_from_slice(&self.stash);
|
||||
self.redraw();
|
||||
}
|
||||
|
||||
fn set_data(&self) { self.iox.set_gpio_pin_value(self.cd_port, self.cd_pin, IoxValue::High); }
|
||||
|
||||
fn set_command(&self) { self.iox.set_gpio_pin_value(self.cd_port, self.cd_pin, IoxValue::Low); }
|
||||
|
||||
pub fn send_command<'b, U>(&'b mut self, cmd: U)
|
||||
where
|
||||
U: IntoIterator<Item = u8> + 'b,
|
||||
|
|
@ -405,23 +422,6 @@ impl<'a> Oled128x128<'a> {
|
|||
self.spim.txrx_await(false).unwrap();
|
||||
}
|
||||
|
||||
pub fn screen_size(&self) -> Point { Point::new(WIDTH, LINES) }
|
||||
|
||||
pub fn redraw(&mut self) { self.draw(); }
|
||||
|
||||
pub fn blit_screen(&mut self, bmp: &[u32]) { self.buffer.copy_from_slice(bmp); }
|
||||
|
||||
pub fn set_devboot(&mut self, _ena: bool) {
|
||||
unimplemented!("devboot feature does not exist on this platform");
|
||||
}
|
||||
|
||||
pub fn stash(&mut self) { self.stash.copy_from_slice(&self.buffer); }
|
||||
|
||||
pub fn pop(&mut self) {
|
||||
self.buffer.copy_from_slice(&self.stash);
|
||||
self.redraw();
|
||||
}
|
||||
|
||||
pub fn init(&mut self) {
|
||||
use Command::*;
|
||||
let init_sequence = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue