Started deep sleep command

This commit is contained in:
Zac Wilson 2025-12-15 16:19:30 +00:00
parent f30e0b7dc4
commit fa4cc5d3f2

View file

@ -155,4 +155,14 @@ impl<BusyPin: InputPin, ResetPin: OutputPin, DcPin: OutputPin, Spi: SpiDevice, D
self.delay.delay_ms(1); self.delay.delay_ms(1);
self.wait_for_display(); self.wait_for_display();
} }
/// Puts the display into deep sleep mode which effectively deinitialises the display controller.
///
/// Reinitialising the display with [EPaperDisplay::new] is sufficient to wake the display back up.
///
/// All display controller registers will be reset by this process.
pub fn deep_sleep(mut self) {
self.write_command(0x07);
self.write_data(0xA5);
}
} }