Struct ssd1306::mode::terminal::TerminalMode [−][src]
pub struct TerminalMode<DI, DSIZE> where
DSIZE: TerminalDisplaySize, { /* fields omitted */ }
Terminal mode handler
Implementations
impl<DI, DSIZE> TerminalMode<DI, DSIZE> where
DI: WriteOnlyDataCommand,
DSIZE: TerminalDisplaySize,
[src]
DI: WriteOnlyDataCommand,
DSIZE: TerminalDisplaySize,
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]
&mut self,
rot: DisplayRotation
) -> Result<(), TerminalModeError>
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]
&mut self,
brightness: Brightness
) -> Result<(), TerminalModeError>
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]
&mut self,
column: u8,
row: u8
) -> Result<(), TerminalModeError>
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]
DI: WriteOnlyDataCommand,
DSIZE: TerminalDisplaySize,
fn new(properties: DisplayProperties<DI, DSIZE>) -> Self
[src]
Create new TerminalMode instance
fn into_properties(self) -> DisplayProperties<DI, DSIZE>
[src]
Release display interface used by TerminalMode
fn release(self) -> DI
[src]
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>,
impl<DI, DSIZE> Write for TerminalMode<DI, DSIZE> where
DI: WriteOnlyDataCommand,
DSIZE: TerminalDisplaySize,
[src]
DI: WriteOnlyDataCommand,
DSIZE: TerminalDisplaySize,
Auto Trait Implementations
impl<DI, DSIZE> Send for TerminalMode<DI, DSIZE> where
DI: Send,
DSIZE: Send,
DI: Send,
DSIZE: Send,
impl<DI, DSIZE> Sync for TerminalMode<DI, DSIZE> where
DI: Sync,
DSIZE: Sync,
DI: Sync,
DSIZE: Sync,
impl<DI, DSIZE> Unpin for TerminalMode<DI, DSIZE> where
DI: Unpin,
DSIZE: Unpin,
DI: Unpin,
DSIZE: 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,
pub 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> Same<T> for T
type Output = T
Should always be Self
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.
pub 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>,