Fix compilation on other flash families

This commit is contained in:
chemicstry 2022-07-20 23:34:13 +03:00
parent 661db6f1b0
commit a62e8a93ec

View File

@ -24,7 +24,10 @@ impl<'d> Flash<'d> {
pub fn new(p: impl Unborrow<Target = FLASH>) -> Self { pub fn new(p: impl Unborrow<Target = FLASH>) -> Self {
unborrow!(p); unborrow!(p);
unsafe { family::init(); } #[cfg(flash_f4)]
unsafe {
family::init();
}
Self { Self {
_inner: p, _inner: p,