Struct ssd1306::mode::graphics::GraphicsMode [−][src]
pub struct GraphicsMode<DI> where
DI: DisplayInterface, { /* fields omitted */ }
Graphics mode handler
Methods
impl<DI> GraphicsMode<DI> where
DI: DisplayInterface,
[src]
impl<DI> GraphicsMode<DI> where
DI: DisplayInterface,
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
Clear the display buffer. You need to call disp.flush()
for any effect on the screen
pub fn reset<RST, DELAY>(&mut self, rst: &mut RST, delay: &mut DELAY) where
RST: OutputPin,
DELAY: DelayMs<u8>,
[src]
pub fn reset<RST, DELAY>(&mut self, rst: &mut RST, delay: &mut DELAY) where
RST: OutputPin,
DELAY: DelayMs<u8>,
Reset display
pub fn flush(&mut self) -> Result<(), ()>
[src]
pub fn flush(&mut self) -> Result<(), ()>
Write out data to display
pub fn set_pixel(&mut self, x: u32, y: u32, value: u8)
[src]
pub fn set_pixel(&mut self, x: u32, y: u32, value: u8)
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<(), ()>
[src]
pub fn init(&mut self) -> Result<(), ()>
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]
pub fn get_dimensions(&self) -> (u8, u8)
Get display dimensions, taking into account the current rotation of the display
pub fn set_rotation(&mut self, rot: DisplayRotation) -> Result<(), ()>
[src]
pub fn set_rotation(&mut self, rot: DisplayRotation) -> Result<(), ()>
Set the display rotation
Trait Implementations
impl<DI> DisplayModeTrait<DI> for GraphicsMode<DI> where
DI: DisplayInterface,
[src]
impl<DI> DisplayModeTrait<DI> for GraphicsMode<DI> where
DI: DisplayInterface,
fn new(properties: DisplayProperties<DI>) -> Self
[src]
fn new(properties: DisplayProperties<DI>) -> Self
Create new GraphicsMode instance
fn release(self) -> DisplayProperties<DI>
[src]
fn release(self) -> DisplayProperties<DI>
Release all resources used by GraphicsMode
impl<DI> Drawing<PixelColorU8> for GraphicsMode<DI> where
DI: DisplayInterface,
[src]
impl<DI> Drawing<PixelColorU8> for GraphicsMode<DI> where
DI: DisplayInterface,
fn draw<T>(&mut self, item_pixels: T) where
T: Iterator<Item = Pixel<PixelColorU8>>,
[src]
fn draw<T>(&mut self, item_pixels: T) where
T: Iterator<Item = Pixel<PixelColorU8>>,
Draw an object from an iterator over its pixels
Auto Trait Implementations
impl<DI> Send for GraphicsMode<DI> where
DI: Send,
impl<DI> Send for GraphicsMode<DI> where
DI: Send,
impl<DI> Sync for GraphicsMode<DI> where
DI: Sync,
impl<DI> Sync for GraphicsMode<DI> where
DI: Sync,