[][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<(), DI::Error>[src]

Clear the display

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<(), ()>[src]

Write out data to display. This is a noop in terminal mode.

pub fn print_char<T>(&mut self, c: T) -> Result<(), DI::Error> where
    TerminalMode<DI>: CharacterBitmap<T>, 
[src]

Print a character to the display

pub fn init(&mut self) -> Result<(), DI::Error>[src]

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.

pub fn set_rotation(&mut self, rot: DisplayRotation) -> Result<(), DI::Error>[src]

Set the display rotation

pub fn display_on(&mut self, on: bool) -> Result<(), DI::Error>[src]

Turn the display on or off. The display can be drawn to and retains all of its memory even while off.

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> CharacterBitmap<char> for TerminalMode<DI> where
    DI: DisplayInterface
[src]

A 7x7 font shamelessly borrowed from https://github.com/techninja/MarioChron/

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

fn write_char(&mut self, c: char) -> Result<(), Error>1.1.0[src]

Writes a [char] into this writer, returning whether the write succeeded. Read more

fn write_fmt(&mut self, args: Arguments) -> Result<(), Error>1.0.0[src]

Glue for usage of the [write!] macro with implementors of this trait. Read more

Auto Trait Implementations

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

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

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

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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