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§
Sourcefn init(&mut self, delay: &mut impl DelayNs) -> Result<(), DisplayError>
fn init(&mut self, delay: &mut impl DelayNs) -> Result<(), DisplayError>
Reset and initialize the display
Sourcefn sleep(&mut self, delay: &mut impl DelayNs) -> Result<(), DisplayError>
fn sleep(&mut self, delay: &mut impl DelayNs) -> Result<(), DisplayError>
Power down the controller
Sourcefn update_bw(
&mut self,
buffer: &[u8],
delay: &mut impl DelayNs,
) -> Result<(), DisplayError>
fn update_bw( &mut self, buffer: &[u8], delay: &mut impl DelayNs, ) -> Result<(), DisplayError>
Send black/white buffer to display
Sourcefn update_red(
&mut self,
buffer: &[u8],
delay: &mut impl DelayNs,
) -> Result<(), DisplayError>
fn update_red( &mut self, buffer: &[u8], delay: &mut impl DelayNs, ) -> Result<(), DisplayError>
Send red buffer
Sourcefn update(
&mut self,
low_buffer: &[u8],
high_buffer: &[u8],
delay: &mut impl DelayNs,
) -> Result<(), DisplayError>
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
Sourcefn clear_bw_ram(&mut self) -> Result<(), DisplayError>
fn clear_bw_ram(&mut self) -> Result<(), DisplayError>
Clear the BW RAM
Sourcefn clear_red_ram(&mut self) -> Result<(), DisplayError>
fn clear_red_ram(&mut self) -> Result<(), DisplayError>
Clear the red RAM
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.