From 0c3944c103f1b375b50d60af68f473fe6af25805 Mon Sep 17 00:00:00 2001 From: Robert Wiewel Date: Wed, 23 Apr 2025 17:27:06 +0200 Subject: [PATCH] Update sleep routine to be in line with the driver datasheet. This fixes an issue where after issuing a `sleep`, the display never wakes up again. --- src/epd3in7/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/epd3in7/mod.rs b/src/epd3in7/mod.rs index c01c49fa..7480bf9a 100644 --- a/src/epd3in7/mod.rs +++ b/src/epd3in7/mod.rs @@ -156,10 +156,8 @@ where } fn sleep(&mut self, spi: &mut SPI, _delay: &mut DELAY) -> Result<(), SPI::Error> { - self.interface.cmd_with_data(spi, Command::Sleep, &[0xF7])?; - self.interface.cmd(spi, Command::PowerOff)?; self.interface - .cmd_with_data(spi, Command::Sleep2, &[0xA5])?; + .cmd_with_data(spi, Command::DeepSleep, &[0x03])?; Ok(()) }