diff --git a/src/epd1in54/mod.rs b/src/epd1in54/mod.rs index 158e0ae..20df11e 100644 --- a/src/epd1in54/mod.rs +++ b/src/epd1in54/mod.rs @@ -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> { diff --git a/src/epd2in9/mod.rs b/src/epd2in9/mod.rs index 42f062c..e8ac3b9 100644 --- a/src/epd2in9/mod.rs +++ b/src/epd2in9/mod.rs @@ -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> { diff --git a/src/traits.rs b/src/traits.rs index 814e8cd..a689828 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -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