From 4b5434c7b648cd9af001d93c2c965965bd4e3b7d Mon Sep 17 00:00:00 2001 From: Erik Henriksson Date: Thu, 8 Dec 2022 19:11:31 +0100 Subject: [PATCH] [stm32] Feature guard flash::init() --- embassy-stm32/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index dcb191e7..7678cf3d 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs @@ -161,7 +161,10 @@ pub fn init(config: Config) -> Peripherals { // must be after rcc init #[cfg(feature = "_time-driver")] time_driver::init(); - + + #[cfg(any( + flash_l0, flash_l1, flash_wl, flash_wb, flash_l4, flash_f3, flash_f4, flash_f7, flash_h7 + ))] flash::init(); }