Struct ssd1306::mode::terminal::TerminalMode
source · pub struct TerminalMode<DI> { /* private fields */ }
Expand description
Terminal mode handler
Implementations§
source§impl<DI> TerminalMode<DI>where
DI: DisplayInterface,
impl<DI> TerminalMode<DI>where
DI: DisplayInterface,
sourcepub fn reset<RST, DELAY>(&mut self, rst: &mut RST, delay: &mut DELAY)where
RST: OutputPin,
DELAY: DelayMs<u8>,
pub fn reset<RST, DELAY>(&mut self, rst: &mut RST, delay: &mut DELAY)where
RST: OutputPin,
DELAY: DelayMs<u8>,
Reset display
sourcepub fn flush(&mut self) -> Result<(), ()>
pub fn flush(&mut self) -> Result<(), ()>
Write out data to display. This is a noop in terminal mode.
sourcepub fn print_char<T>(&mut self, c: T) -> Result<(), ()>where
TerminalMode<DI>: CharacterBitmap<T>,
pub fn print_char<T>(&mut self, c: T) -> Result<(), ()>where
TerminalMode<DI>: CharacterBitmap<T>,
Print a character to the display
sourcepub fn init(&mut self) -> Result<(), ()>
pub fn init(&mut self) -> Result<(), ()>
Initialise the display in column mode (i.e. a byte walks down a column of 8 pixels) with column 0 on the left and column (display_width - 1) on the right.
sourcepub fn set_rotation(&mut self, rot: DisplayRotation) -> Result<(), ()>
pub fn set_rotation(&mut self, rot: DisplayRotation) -> Result<(), ()>
Set the display rotation
Trait Implementations§
source§impl<DI> CharacterBitmap<char> for TerminalMode<DI>where
DI: DisplayInterface,
impl<DI> CharacterBitmap<char> for TerminalMode<DI>where
DI: DisplayInterface,
A 7x7 font shamelessly borrowed from https://github.com/techninja/MarioChron/
source§impl<DI> DisplayModeTrait<DI> for TerminalMode<DI>where
DI: DisplayInterface,
impl<DI> DisplayModeTrait<DI> for TerminalMode<DI>where
DI: DisplayInterface,
source§fn new(properties: DisplayProperties<DI>) -> Self
fn new(properties: DisplayProperties<DI>) -> Self
Create new TerminalMode instance
source§fn release(self) -> DisplayProperties<DI>
fn release(self) -> DisplayProperties<DI>
Release all resources used by TerminalMode