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

pub struct TerminalMode<DI, DSIZE = DisplaySize128x64> where
    DSIZE: TerminalDisplaySize
{ /* fields omitted */ }

Terminal mode handler

Implementations

impl<DI, DSIZE> TerminalMode<DI, DSIZE> where
    DI: WriteOnlyDataCommand,
    DSIZE: TerminalDisplaySize
[src]

pub fn clear(&mut self) -> Result<(), TerminalModeError>[src]

Clear the display and reset the cursor to the top left corner

pub fn flush(&mut self) -> Result<(), TerminalModeError>[src]

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

pub fn print_char(&mut self, c: char) -> Result<(), TerminalModeError>[src]

Print a character to the display

pub fn init(&mut self) -> Result<(), TerminalModeError>[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 (DSIZE::Width::U8 - 1) on the right, but no automatic line wrapping.

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

Set the display rotation

This method resets the cursor but does not clear the screen.

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

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

pub fn set_brightness(
    &mut self,
    brightness: Brightness
) -> Result<(), TerminalModeError>
[src]

Change the display brightness.

pub fn get_position(&self) -> Result<(u8, u8), TerminalModeError>[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>
[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, DSIZE> DisplayModeTrait<DI, DSIZE> for TerminalMode<DI, DSIZE> where
    DI: WriteOnlyDataCommand,
    DSIZE: TerminalDisplaySize
[src]

pub fn new(properties: DisplayProperties<DI, DSIZE>) -> Self[src]

Create new TerminalMode instance

pub fn into_properties(self) -> DisplayProperties<DI, DSIZE>[src]

Release display interface used by TerminalMode

impl<DI, DSIZE> Write for TerminalMode<DI, DSIZE> where
    DI: WriteOnlyDataCommand,
    DSIZE: TerminalDisplaySize
[src]

Auto Trait Implementations

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

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

impl<DI, DSIZE> Unpin for TerminalMode<DI, DSIZE> where
    DI: Unpin,
    DSIZE: 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> Same<T> for T

type Output = T

Should always be Self

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.