[−][src]Struct ssd1306::mode::terminal::TerminalMode
Terminal mode handler
Methods
impl<DI> TerminalMode<DI> where
DI: DisplayInterface,
[src]
DI: DisplayInterface,
pub fn clear(&mut self) -> Result<(), TerminalModeError<DI>>
[src]
Clear the display and reset the cursor to the top left corner
pub fn reset<RST, DELAY, PinE>(
&mut self,
rst: &mut RST,
delay: &mut DELAY
) -> Result<(), Error<(), PinE>> where
RST: OutputPin<Error = PinE>,
DELAY: DelayMs<u8>,
[src]
&mut self,
rst: &mut RST,
delay: &mut DELAY
) -> Result<(), Error<(), PinE>> where
RST: OutputPin<Error = PinE>,
DELAY: DelayMs<u8>,
Reset display
pub fn flush(&mut self) -> Result<(), TerminalModeError<DI>>
[src]
Write out data to display. This is a noop in terminal mode.
pub fn print_char(&mut self, c: char) -> Result<(), TerminalModeError<DI>>
[src]
Print a character to the display
pub fn init(&mut self) -> Result<(), TerminalModeError<DI>>
[src]
Initialise the display in page 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, but no automatic line wrapping.
pub fn set_rotation(
&mut self,
rot: DisplayRotation
) -> Result<(), TerminalModeError<DI>>
[src]
&mut self,
rot: DisplayRotation
) -> Result<(), TerminalModeError<DI>>
Set the display rotation
pub fn display_on(&mut self, on: bool) -> Result<(), TerminalModeError<DI>>
[src]
Turn the display on or off. The display can be drawn to and retains all of its memory even while off.
pub fn get_position(&self) -> Result<(u8, u8), TerminalModeError<DI>>
[src]
Get the current cursor position, in character coordinates. This is the (column, row) that the next character will be written to.
pub fn set_position(
&mut self,
column: u8,
row: u8
) -> Result<(), TerminalModeError<DI>>
[src]
&mut self,
column: u8,
row: u8
) -> Result<(), TerminalModeError<DI>>
Set the cursor position, in character coordinates. This is the (column, row) that the next character will be written to. If the position is out of bounds, an Err will be returned.
Trait Implementations
impl<DI> DisplayModeTrait<DI> for TerminalMode<DI> where
DI: DisplayInterface,
[src]
DI: DisplayInterface,
fn new(properties: DisplayProperties<DI>) -> Self
[src]
Create new TerminalMode instance
fn release(self) -> DisplayProperties<DI>
[src]
Release all resources used by TerminalMode
impl<DI> Write for TerminalMode<DI> where
DI: DisplayInterface,
[src]
DI: DisplayInterface,
Auto Trait Implementations
impl<DI> Send for TerminalMode<DI> where
DI: Send,
DI: Send,
impl<DI> Sync for TerminalMode<DI> where
DI: Sync,
DI: Sync,
impl<DI> Unpin for TerminalMode<DI> where
DI: Unpin,
DI: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,