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.embedded-hal-1.0
parent
9b6c7ada16
commit
63321f7e2c
|
|
@ -217,7 +217,10 @@ where
|
||||||
self.interface.cmd(spi, Command::MASTER_ACTIVATION)?;
|
self.interface.cmd(spi, Command::MASTER_ACTIVATION)?;
|
||||||
// MASTER Activation should not be interupted to avoid currption of panel images
|
// MASTER Activation should not be interupted to avoid currption of panel images
|
||||||
// therefore a terminate command is send
|
// 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> {
|
fn clear_frame(&mut self, spi: &mut SPI) -> Result<(), SPI::Error> {
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,10 @@ where
|
||||||
self.interface.cmd(spi, Command::MASTER_ACTIVATION)?;
|
self.interface.cmd(spi, Command::MASTER_ACTIVATION)?;
|
||||||
// MASTER Activation should not be interupted to avoid currption of panel images
|
// MASTER Activation should not be interupted to avoid currption of panel images
|
||||||
// therefore a terminate command is send
|
// 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> {
|
fn clear_frame(&mut self, spi: &mut SPI) -> Result<(), SPI::Error> {
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,8 @@ where
|
||||||
) -> Result<(), SPI::Error>;
|
) -> Result<(), SPI::Error>;
|
||||||
|
|
||||||
/// Displays the frame data from SRAM
|
/// 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>;
|
fn display_frame(&mut self, spi: &mut SPI) -> Result<(), SPI::Error>;
|
||||||
|
|
||||||
/// Clears the frame buffer on the EPD with the declared background color
|
/// Clears the frame buffer on the EPD with the declared background color
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue