Skip to main content

EpdDriver

Trait EpdDriver 

Source
pub trait EpdDriver {
    // Required methods
    fn init(&mut self, delay: &mut impl DelayNs) -> Result<(), DisplayError>;
    fn sleep(&mut self, delay: &mut impl DelayNs) -> Result<(), DisplayError>;
    fn update_bw(
        &mut self,
        buffer: &[u8],
        delay: &mut impl DelayNs,
    ) -> Result<(), DisplayError>;
    fn update_red(
        &mut self,
        buffer: &[u8],
        delay: &mut impl DelayNs,
    ) -> Result<(), DisplayError>;
    fn update(
        &mut self,
        low_buffer: &[u8],
        high_buffer: &[u8],
        delay: &mut impl DelayNs,
    ) -> Result<(), DisplayError>;
    fn clear_bw_ram(&mut self) -> Result<(), DisplayError>;
    fn clear_red_ram(&mut self) -> Result<(), DisplayError>;
    fn begin(&mut self, delay: &mut impl DelayNs) -> Result<(), DisplayError>;
}
Expand description

Trait defining the driver interface for EPD displays

Required Methods§

Source

fn init(&mut self, delay: &mut impl DelayNs) -> Result<(), DisplayError>

Reset and initialize the display

Source

fn sleep(&mut self, delay: &mut impl DelayNs) -> Result<(), DisplayError>

Power down the controller

Source

fn update_bw( &mut self, buffer: &[u8], delay: &mut impl DelayNs, ) -> Result<(), DisplayError>

Send black/white buffer to display

Source

fn update_red( &mut self, buffer: &[u8], delay: &mut impl DelayNs, ) -> Result<(), DisplayError>

Send red buffer

Source

fn update( &mut self, low_buffer: &[u8], high_buffer: &[u8], delay: &mut impl DelayNs, ) -> Result<(), DisplayError>

Send both low (bw) and high (red) buffers to display

Source

fn clear_bw_ram(&mut self) -> Result<(), DisplayError>

Clear the BW RAM

Source

fn clear_red_ram(&mut self) -> Result<(), DisplayError>

Clear the red RAM

Source

fn begin(&mut self, delay: &mut impl DelayNs) -> Result<(), DisplayError>

Begin operation - reset and put into low power state

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<SPI, BSY, DC, RST> EpdDriver for epd_datafuri::displays::adafruit_thinkink_290_mfgn::ThinkInk2in9Gray2<SPI, BSY, DC, RST>
where SPI: SpiDevice, BSY: InputPin, DC: OutputPin, RST: OutputPin,

Source§

impl<SPI, BSY, DC, RST> EpdDriver for epd_datafuri::displays::adafruit_thinkink_290_mfgn::ThinkInk2in9Mono<SPI, BSY, DC, RST>
where SPI: SpiDevice, BSY: InputPin, DC: OutputPin, RST: OutputPin,

Source§

impl<SPI, BSY, DC, RST> EpdDriver for epd_datafuri::displays::adafruit_thinkink_290_t5::ThinkInk2in9Gray2<SPI, BSY, DC, RST>
where SPI: SpiDevice, BSY: InputPin, DC: OutputPin, RST: OutputPin,

Source§

impl<SPI, BSY, DC, RST> EpdDriver for epd_datafuri::displays::adafruit_thinkink_290_t5::ThinkInk2in9Mono<SPI, BSY, DC, RST>
where SPI: SpiDevice, BSY: InputPin, DC: OutputPin, RST: OutputPin,