diff --git a/embassy-stm32/src/flash/common.rs b/embassy-stm32/src/flash/common.rs index 7cec5a3c..e1fe7e9d 100644 --- a/embassy-stm32/src/flash/common.rs +++ b/embassy-stm32/src/flash/common.rs @@ -8,8 +8,7 @@ use embassy_sync::mutex::Mutex; use stm32_metapac::FLASH_BASE; use super::{ - family, Error, FlashLayout, FlashRegion, FLASH_SIZE, MAX_ERASE_SIZE, READ_SIZE, - WRITE_SIZE, FlashSector, FlashBank, + family, Error, FlashBank, FlashLayout, FlashRegion, FlashSector, FLASH_SIZE, MAX_ERASE_SIZE, READ_SIZE, WRITE_SIZE, }; use crate::peripherals::FLASH; use crate::Peripheral; @@ -162,7 +161,6 @@ pub(crate) fn ensure_sector_aligned( Ok(()) } - impl embedded_storage::nor_flash::ErrorType for Flash<'_> { type Error = Error; } diff --git a/embassy-stm32/src/flash/f4.rs b/embassy-stm32/src/flash/f4.rs index 0c008fd0..084bbdc6 100644 --- a/embassy-stm32/src/flash/f4.rs +++ b/embassy-stm32/src/flash/f4.rs @@ -2,26 +2,26 @@ use core::convert::TryInto; use core::ptr::write_volatile; use core::sync::atomic::{fence, Ordering}; +#[cfg(feature = "nightly")] +use embassy_sync::waitqueue::AtomicWaker; + use super::{FlashRegion, FlashSector, FLASH_REGIONS, WRITE_SIZE}; use crate::flash::Error; use crate::pac; -#[cfg(feature = "nightly")] -use embassy_sync::waitqueue::AtomicWaker; - #[cfg(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f469, stm32f479))] mod alt_regions { use embassy_hal_common::PeripheralRef; use stm32_metapac::FLASH_SIZE; use crate::_generated::flash_regions::{OTPRegion, BANK1_REGION1, BANK1_REGION2, BANK1_REGION3, OTP_REGION}; - use crate::flash::{ - common, Bank1Region1, Bank1Region2, BlockingFlashRegion, Error, Flash, FlashBank, FlashRegion, - READ_SIZE, REGION_ACCESS, - }; - use crate::peripherals::FLASH; #[cfg(feature = "nightly")] use crate::flash::asynch; + use crate::flash::{ + common, Bank1Region1, Bank1Region2, BlockingFlashRegion, Error, Flash, FlashBank, FlashRegion, READ_SIZE, + REGION_ACCESS, + }; + use crate::peripherals::FLASH; pub const ALT_BANK1_REGION3: FlashRegion = FlashRegion { size: 3 * BANK1_REGION3.erase_size,