[−][src]Struct ssd1306::mode::graphics::GraphicsMode
Graphics mode handler
Methods
impl<DI> GraphicsMode<DI> where
DI: DisplayInterface,
[src]
DI: DisplayInterface,
pub fn clear(&mut self)
[src]
Clear the display buffer. You need to call disp.flush()
for any effect on the screen
pub 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>,
Reset display
pub fn flush(&mut self) -> Result<(), DI::Error>
[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<(), DI::Error>
[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<(), DI::Error>
[src]
Set the display rotation
pub fn display_on(&mut self, on: bool) -> Result<(), DI::Error>
[src]
Turn the display on or off. The display can be drawn to and retains all of its memory even while off.
Trait Implementations
impl<DI> DisplayModeTrait<DI> for GraphicsMode<DI> where
DI: DisplayInterface,
[src]
DI: DisplayInterface,
fn new(properties: DisplayProperties<DI>) -> Self
[src]
Create new GraphicsMode instance
fn release(self) -> DisplayProperties<DI>
[src]
Release all resources used by GraphicsMode
impl<DI> Drawing<BinaryColor> for GraphicsMode<DI> where
DI: DisplayInterface,
[src]
DI: DisplayInterface,
fn draw<T>(&mut self, item_pixels: T) where
T: IntoIterator<Item = Pixel<BinaryColor>>,
[src]
T: IntoIterator<Item = Pixel<BinaryColor>>,
Auto Trait Implementations
impl<DI> Unpin for GraphicsMode<DI> where
DI: Unpin,
DI: Unpin,
impl<DI> Send for GraphicsMode<DI> where
DI: Send,
DI: Send,
impl<DI> Sync for GraphicsMode<DI> where
DI: Sync,
DI: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,