diff --git a/libs/bao1x-hal/src/lib.rs b/libs/bao1x-hal/src/lib.rs index 790bc306d..8f36d73d6 100644 --- a/libs/bao1x-hal/src/lib.rs +++ b/libs/bao1x-hal/src/lib.rs @@ -60,6 +60,8 @@ pub mod rtc; pub mod sigcheck; #[cfg(not(feature = "hosted-baosec"))] pub mod sram_trim; +#[cfg(not(feature = "hosted-baosec"))] +pub mod wdt; #[inline(always)] pub fn cache_flush() { diff --git a/libs/bao1x-hal/src/sh1107.rs b/libs/bao1x-hal/src/sh1107.rs index d940ef124..db841d674 100644 --- a/libs/bao1x-hal/src/sh1107.rs +++ b/libs/bao1x-hal/src/sh1107.rs @@ -532,6 +532,11 @@ impl<'a> Oled128x128<'a> { pub fn powerdown(&mut self) { self.powerdown = true; + let powoff = [Command::DisplayOnOff(DisplayState::Off)]; + for command in powoff { + let bytes = command.encode(); + self.send_command(bytes).ok(); + } // assert reset crate::board::assert_periph_reset(self.iox, true); self.iox.set_gpio_pin_value(self.cd_port, self.cd_pin, IoxValue::Low);