[][src]Struct ssd1306::mode::graphics::GraphicsMode

pub struct GraphicsMode<DI, DSIZE> where
    DSIZE: DisplaySize
{ /* fields omitted */ }

Graphics mode handler

Implementations

impl<DI, DSIZE> GraphicsMode<DI, DSIZE> where
    DSIZE: DisplaySize,
    DI: WriteOnlyDataCommand
[src]

pub fn clear(&mut self)[src]

Clear the display buffer. You need to call disp.flush() for any effect on the screen

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

Write out data to a display.

This only updates the parts of the display that have changed since the last flush.

pub fn set_pixel(&mut self, x: u32, y: u32, value: u8)[src]

Turn a pixel on or off. A non-zero value is treated as on, 0 as off. If the X and Y coordinates are out of the bounds of the display, this method call is a noop.

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

Display is set up in column mode, i.e. a byte walks down a column of 8 pixels from column 0 on the left, to column n on the right

pub fn get_dimensions(&self) -> (u8, u8)[src]

Get display dimensions, taking into account the current rotation of the display

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

Set the display rotation

pub fn display_on(&mut self, on: bool) -> Result<(), DisplayError>[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<(), DisplayError>
[src]

Change the display brightness.

Trait Implementations

impl<DI, DSIZE> DisplayModeTrait<DI, DSIZE> for GraphicsMode<DI, DSIZE> where
    DSIZE: DisplaySize
[src]

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

Create new GraphicsMode instance

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

Release display interface used by GraphicsMode

impl<DI, DSIZE> DrawTarget<BinaryColor> for GraphicsMode<DI, DSIZE> where
    DI: WriteOnlyDataCommand,
    DSIZE: DisplaySize
[src]

type Error = DisplayError

Error type to return when a drawing operation fails. Read more

Auto Trait Implementations

impl<DI, DSIZE> Send for GraphicsMode<DI, DSIZE> where
    DI: Send,
    DSIZE: Send,
    <DSIZE as DisplaySize>::BufferSize: ArrayLength<u8>, 
[src]

impl<DI, DSIZE> Sync for GraphicsMode<DI, DSIZE> where
    DI: Sync,
    DSIZE: Sync,
    <DSIZE as DisplaySize>::BufferSize: ArrayLength<u8>, 
[src]

impl<DI, DSIZE> Unpin for GraphicsMode<DI, DSIZE> where
    DI: Unpin,
    DSIZE: Unpin,
    <<DSIZE as DisplaySize>::BufferSize as ArrayLength<u8>>::ArrayType: Unpin
[src]

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.