From b0629f335787aef09e848c2b53ec8edc8fa2901d Mon Sep 17 00:00:00 2001 From: Erik Henriksson Date: Fri, 9 Dec 2022 09:24:07 +0100 Subject: [PATCH] [stm32] Fix CI --- embassy-stm32/src/flash/h7.rs | 3 --- embassy-stm32/src/flash/l.rs | 9 --------- embassy-stm32/src/flash/mod.rs | 1 + 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/embassy-stm32/src/flash/h7.rs b/embassy-stm32/src/flash/h7.rs index 49ba8ef3..3178b3be 100644 --- a/embassy-stm32/src/flash/h7.rs +++ b/embassy-stm32/src/flash/h7.rs @@ -199,6 +199,3 @@ pub(crate) unsafe fn blocking_wait_ready(bank: pac::flash::Bank) -> Result<(), E } } } - -// safety: must be called only once at startup -pub(crate) unsafe fn init() {} diff --git a/embassy-stm32/src/flash/l.rs b/embassy-stm32/src/flash/l.rs index e6c1826a..5048a331 100644 --- a/embassy-stm32/src/flash/l.rs +++ b/embassy-stm32/src/flash/l.rs @@ -185,12 +185,3 @@ pub(crate) unsafe fn blocking_wait_ready() -> Result<(), Error> { } } } - -// safety: must be called only once at startup -pub(crate) unsafe fn init() { - crate::pac::FLASH.acr().modify(|w| { - w.set_dcen(true); - w.set_icen(true); - w.set_prften(true); - }); -} diff --git a/embassy-stm32/src/flash/mod.rs b/embassy-stm32/src/flash/mod.rs index b491f7dc..3bba828d 100644 --- a/embassy-stm32/src/flash/mod.rs +++ b/embassy-stm32/src/flash/mod.rs @@ -181,5 +181,6 @@ cfg_if::cfg_if! { // safety: must be called only once at startup pub(crate) unsafe fn init() { + #[cfg(any(flash_f3, flash_f4, flash_f7))] family::init(); }