Run format with nightly

This commit is contained in:
Rasmus Melchior Jacobsen 2023-05-24 13:11:03 +02:00
parent c6ffece410
commit 6df6239704
2 changed files with 9 additions and 11 deletions

View File

@ -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;
}

View File

@ -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,