[][src]Struct ssd1306::mode::terminal::TerminalMode

pub struct TerminalMode<DI> { /* fields omitted */ }

Terminal mode handler

Methods

impl<DI> TerminalMode<DI> where
    DI: DisplayInterface
[src]

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]

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]

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]

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]

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]

Auto Trait Implementations

impl<DI> Send for TerminalMode<DI> where
    DI: Send

impl<DI> Sync for TerminalMode<DI> where
    DI: Sync

impl<DI> Unpin for TerminalMode<DI> where
    DI: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.