Struct eink_waveshare_rs::EPD4in2[][src]

pub struct EPD4in2<SPI, CS, BUSY, DC, RST, D> { /* fields omitted */ }

EPD4in2 driver

Trait Implementations

impl<SPI, CS, BUSY, DC, RST, Delay, ERR> WaveshareInterface<SPI, CS, BUSY, DC, RST, Delay, ERR> for EPD4in2<SPI, CS, BUSY, DC, RST, Delay> where
    SPI: Write<u8, Error = ERR>,
    CS: OutputPin,
    BUSY: InputPin,
    DC: OutputPin,
    RST: OutputPin,
    Delay: DelayUs<u16> + DelayMs<u16>, 
[src]

Creates a new driver from a SPI peripheral, CS Pin, Busy InputPin, DC

This already initialises the device. That means init() isn't needed directly afterwards

Example

This example is not tested
//buffer = some image data;

let mut epd4in2 = EPD4in2::new(spi, cs, busy, dc, rst, delay);

epd4in2.display_and_transfer_frame(buffer, None);

epd4in2.sleep();

Let the device enter deep-sleep mode to save power. Read more

Transmit a full frame to the SRAM of the DPD

Transmits partial data to the SRAM of the EPD Read more

Displays the frame data from SRAM

Clears the frame from the buffer with the declared background color The background color can be changed with [set_background_color] Read more

Sets the backgroundcolor for various commands like WaveshareInterface::clear_frame()

Get current background color

Get the width of the display

Get the height of the display

Abstraction of setting the delay for simpler calls Read more

Loads a full image on the EPD and displays it

Loads a partial image on the EPD and displays it

Auto Trait Implementations

impl<SPI, CS, BUSY, DC, RST, D> Send for EPD4in2<SPI, CS, BUSY, DC, RST, D> where
    BUSY: Send,
    CS: Send,
    D: Send,
    DC: Send,
    RST: Send,
    SPI: Send

impl<SPI, CS, BUSY, DC, RST, D> Sync for EPD4in2<SPI, CS, BUSY, DC, RST, D> where
    BUSY: Sync,
    CS: Sync,
    D: Sync,
    DC: Sync,
    RST: Sync,
    SPI: Sync