[−][src]Struct ssd1675::graphics::GraphicDisplay
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]
I: DisplayInterface,
pub fn new(
display: Display<'a, I>,
black_buffer: &'a mut [u8],
red_buffer: &'a mut [u8]
) -> Self
[src]
display: Display<'a, I>,
black_buffer: &'a mut [u8],
red_buffer: &'a mut [u8]
) -> Self
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]
&mut self,
black: &[u8],
red: &[u8],
delay: &mut D
) -> Result<(), I::Error>
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]
I: DisplayInterface,
type Target = Display<'a, I>
The resulting type after dereferencing.
fn deref(&self) -> &Display<'a, I>
[src]
impl<'a, I> DerefMut for GraphicDisplay<'a, I> where
I: DisplayInterface,
[src]
I: DisplayInterface,
impl<'a, I> Drawing<Color> for GraphicDisplay<'a, I> where
I: DisplayInterface,
[src]
I: DisplayInterface,
fn draw<T>(&mut self, item_pixels: T) where
T: IntoIterator<Item = Pixel<Color>>,
[src]
T: IntoIterator<Item = Pixel<Color>>,
Auto Trait Implementations
impl<'a, I> Send for GraphicDisplay<'a, I> where
I: Send,
I: Send,
impl<'a, I> Sync for GraphicDisplay<'a, I> where
I: Sync,
I: Sync,
impl<'a, I> Unpin for GraphicDisplay<'a, I> where
I: Unpin,
I: 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,
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, 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.
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>,