mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-04 06:16:42 +00:00
Fix: Timing Issues after display_frame
epd1in54 and epd2in9 were both missing a necessary wait_until_idle call at the end of their display_frame function which sometimes caused invalid/ignored commands/inputs afterwards.
This commit is contained in:
+4
-1
@@ -217,7 +217,10 @@ where
|
||||
self.interface.cmd(spi, Command::MASTER_ACTIVATION)?;
|
||||
// MASTER Activation should not be interupted to avoid currption of panel images
|
||||
// therefore a terminate command is send
|
||||
self.interface.cmd(spi, Command::NOP)
|
||||
self.interface.cmd(spi, Command::NOP)?;
|
||||
|
||||
self.wait_until_idle();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn clear_frame(&mut self, spi: &mut SPI) -> Result<(), SPI::Error> {
|
||||
|
||||
+4
-1
@@ -216,7 +216,10 @@ where
|
||||
self.interface.cmd(spi, Command::MASTER_ACTIVATION)?;
|
||||
// MASTER Activation should not be interupted to avoid currption of panel images
|
||||
// therefore a terminate command is send
|
||||
self.interface.cmd(spi, Command::NOP)
|
||||
self.interface.cmd(spi, Command::NOP)?;
|
||||
|
||||
self.wait_until_idle();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn clear_frame(&mut self, spi: &mut SPI) -> Result<(), SPI::Error> {
|
||||
|
||||
@@ -123,6 +123,8 @@ where
|
||||
) -> Result<(), SPI::Error>;
|
||||
|
||||
/// Displays the frame data from SRAM
|
||||
///
|
||||
/// This function waits until the device isn`t busy anymore
|
||||
fn display_frame(&mut self, spi: &mut SPI) -> Result<(), SPI::Error>;
|
||||
|
||||
/// Clears the frame buffer on the EPD with the declared background color
|
||||
|
||||
Reference in New Issue
Block a user