Ensure flash module and FlashRegion trait is always defined
This commit is contained in:
parent
bc69eb596e
commit
e8fc7a66a3
7
embassy-stm32/src/flash/other.rs
Normal file
7
embassy-stm32/src/flash/other.rs
Normal file
@ -0,0 +1,7 @@
|
||||
pub trait FlashRegion {
|
||||
const BASE: usize;
|
||||
const SIZE: usize;
|
||||
const ERASE_SIZE: usize;
|
||||
const WRITE_SIZE: usize;
|
||||
const ERASE_VALUE: u8;
|
||||
}
|
@ -47,6 +47,13 @@ pub mod crc;
|
||||
flash_l0, flash_l1, flash_wl, flash_wb, flash_l4, flash_f3, flash_f4, flash_f7, flash_h7
|
||||
))]
|
||||
pub mod flash;
|
||||
#[cfg(not(any(
|
||||
flash_l0, flash_l1, flash_wl, flash_wb, flash_l4, flash_f3, flash_f4, flash_f7, flash_h7
|
||||
)))]
|
||||
pub mod flash {
|
||||
mod other;
|
||||
pub use other::FlashRegion;
|
||||
}
|
||||
pub mod pwm;
|
||||
#[cfg(rng)]
|
||||
pub mod rng;
|
||||
|
Loading…
Reference in New Issue
Block a user