Struct ls010b7dh01::Ls010b7dh01
[−]
[src]
pub struct Ls010b7dh01<SPI, CS, DISP> { /* fields omitted */ }
Methods
impl<SPI, CS, DISP, E> Ls010b7dh01<SPI, CS, DISP> where
SPI: Write<u8, Error = E>,
CS: OutputPin,
DISP: OutputPin,
[src]
SPI: Write<u8, Error = E>,
CS: OutputPin,
DISP: OutputPin,
pub fn new(spi: SPI, cs: CS, disp: DISP) -> Self
[src]
Create a new Ls010b7dh01 object
disp
is the pin connected to the display_enable pin of
the memory LCD.
pub fn enable(&mut self)
[src]
Enable the LCD
pub fn disable(&mut self)
[src]
Disable the LCD
pub fn write_pixel(&mut self, x: u8, y: u8, val: bool)
[src]
Write a single pixel at (x, y) a given value
true is a black pixel false is a white pixel
pub fn write_checkerboard(&mut self)
[src]
A demo function for writing every pixel in alternating off/on
pub fn draw_rect(&mut self, x: u8, y: u8, width: u8, height: u8)
[src]
Draw a rectangle
(x, y) are bottom right of the rectangle
pub fn draw_circle(&mut self, x0: u8, y0: u8, r: u8, value: bool)
[src]
Draw a Circle to the Buffer
Note: This algorithm is pulled directly from wikipedia: https://en.wikipedia.org/wiki/Midpoint_circle_algorithm
pub fn flush_buffer(&mut self)
[src]
Draw the buffer to the screen
pub fn clear(&mut self)
[src]
Clear the screen and the buffer
pub fn display_mode(&mut self)
[src]
Enter display mode for power savings
Trait Implementations
Auto Trait Implementations
impl<SPI, CS, DISP> Send for Ls010b7dh01<SPI, CS, DISP> where
CS: Send,
DISP: Send,
SPI: Send,
CS: Send,
DISP: Send,
SPI: Send,
impl<SPI, CS, DISP> Sync for Ls010b7dh01<SPI, CS, DISP> where
CS: Sync,
DISP: Sync,
SPI: Sync,
CS: Sync,
DISP: Sync,
SPI: Sync,