aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/flash
diff options
context:
space:
mode:
authorgoueslati <[email protected]>2023-06-12 14:27:53 +0100
committergoueslati <[email protected]>2023-06-12 14:27:53 +0100
commit2d89cfb18f00aefbfa108728dfea3398e80ea3e4 (patch)
tree6485dacac7e61c4378ac522e709edb0a86bd7523 /embassy-stm32/src/flash
parent2dd5ce83ec0421564e85b667f5dabd592f313e5c (diff)
parentab86b060500ceda1c80e39f35af69cb08a7b63a2 (diff)
fix merge conflict
Diffstat (limited to 'embassy-stm32/src/flash')
-rw-r--r--embassy-stm32/src/flash/asynch.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-stm32/src/flash/asynch.rs b/embassy-stm32/src/flash/asynch.rs
index 872614d4e..70a5ded62 100644
--- a/embassy-stm32/src/flash/asynch.rs
+++ b/embassy-stm32/src/flash/asynch.rs
@@ -1,7 +1,6 @@
1use core::marker::PhantomData; 1use core::marker::PhantomData;
2 2
3use atomic_polyfill::{fence, Ordering}; 3use atomic_polyfill::{fence, Ordering};
4use embassy_cortex_m::interrupt::Interrupt;
5use embassy_hal_common::drop::OnDrop; 4use embassy_hal_common::drop::OnDrop;
6use embassy_hal_common::into_ref; 5use embassy_hal_common::into_ref;
7use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; 6use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
@@ -11,6 +10,7 @@ use super::{
11 blocking_read, ensure_sector_aligned, family, get_sector, Async, Error, Flash, FlashLayout, FLASH_BASE, FLASH_SIZE, 10 blocking_read, ensure_sector_aligned, family, get_sector, Async, Error, Flash, FlashLayout, FLASH_BASE, FLASH_SIZE,
12 WRITE_SIZE, 11 WRITE_SIZE,
13}; 12};
13use crate::interrupt::InterruptExt;
14use crate::peripherals::FLASH; 14use crate::peripherals::FLASH;
15use crate::{interrupt, Peripheral}; 15use crate::{interrupt, Peripheral};
16 16
@@ -19,12 +19,12 @@ pub(super) static REGION_ACCESS: Mutex<CriticalSectionRawMutex, ()> = Mutex::new
19impl<'d> Flash<'d, Async> { 19impl<'d> Flash<'d, Async> {
20 pub fn new( 20 pub fn new(
21 p: impl Peripheral<P = FLASH> + 'd, 21 p: impl Peripheral<P = FLASH> + 'd,
22 _irq: impl interrupt::Binding<crate::interrupt::FLASH, InterruptHandler> + 'd, 22 _irq: impl interrupt::typelevel::Binding<crate::interrupt::typelevel::FLASH, InterruptHandler> + 'd,
23 ) -> Self { 23 ) -> Self {
24 into_ref!(p); 24 into_ref!(p);
25 25
26 crate::interrupt::FLASH::unpend(); 26 crate::interrupt::FLASH.unpend();
27 unsafe { crate::interrupt::FLASH::enable() }; 27 unsafe { crate::interrupt::FLASH.enable() };
28 28
29 Self { 29 Self {
30 inner: p, 30 inner: p,
@@ -49,7 +49,7 @@ impl<'d> Flash<'d, Async> {
49/// Interrupt handler 49/// Interrupt handler
50pub struct InterruptHandler; 50pub struct InterruptHandler;
51 51
52impl interrupt::Handler<crate::interrupt::FLASH> for InterruptHandler { 52impl interrupt::typelevel::Handler<crate::interrupt::typelevel::FLASH> for InterruptHandler {
53 unsafe fn on_interrupt() { 53 unsafe fn on_interrupt() {
54 family::on_interrupt(); 54 family::on_interrupt();
55 } 55 }