[][src]Struct ssd1675::graphics::GraphicDisplay

pub struct GraphicDisplay<'a, I> where
    I: DisplayInterface
{ /* fields omitted */ }

A display that holds buffers for drawing into and updating the display from.

When the graphics feature is enabled GraphicDisplay implements the Draw trait from embedded-graphics. This allows basic shapes and text to be drawn on the display.

Methods

impl<'a, I> GraphicDisplay<'a, I> where
    I: DisplayInterface
[src]

pub fn new(
    display: Display<'a, I>,
    black_buffer: &'a mut [u8],
    red_buffer: &'a mut [u8]
) -> Self
[src]

Promote a Display to a GraphicDisplay.

B/W and Red buffers for drawing into must be supplied. These should be rows * cols in length.

pub fn update<D: DelayMs<u8>>(&mut self, delay: &mut D) -> Result<(), I::Error>[src]

Update the display by writing the buffers to the controller.

pub fn clear(&mut self, color: Color)[src]

Clear the buffers, filling them a single color.

Methods from Deref<Target = Display<'a, I>>

pub fn reset<D: DelayMs<u8>>(&mut self, delay: &mut D) -> Result<(), I::Error>[src]

Perform a hardware reset followed by software reset.

This will wake a controller that has previously entered deep sleep.

pub fn update<D: DelayMs<u8>>(
    &mut self,
    black: &[u8],
    red: &[u8],
    delay: &mut D
) -> Result<(), I::Error>
[src]

Update the display by writing the supplied B/W and Red buffers to the controller.

This method will write the two buffers to the controller then initiate the update display command. Currently it will busy wait until the update has completed.

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

Enter deep sleep mode.

This puts the display controller into a low power mode. reset must be called to wake it from sleep.

pub fn rows(&self) -> u16[src]

Returns the number of rows the display has.

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

Returns the number of columns the display has.

pub fn rotation(&self) -> Rotation[src]

Returns the rotation the display was configured with.

Trait Implementations

impl<'a, I> Deref for GraphicDisplay<'a, I> where
    I: DisplayInterface
[src]

type Target = Display<'a, I>

The resulting type after dereferencing.

impl<'a, I> DerefMut for GraphicDisplay<'a, I> where
    I: DisplayInterface
[src]

impl<'a, I> Drawing<Color> for GraphicDisplay<'a, I> where
    I: DisplayInterface
[src]

Auto Trait Implementations

impl<'a, I> Send for GraphicDisplay<'a, I> where
    I: Send

impl<'a, I> Sync for GraphicDisplay<'a, I> where
    I: Sync

impl<'a, I> Unpin for GraphicDisplay<'a, I> where
    I: 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.