Implement drop for FlashRegions
This commit is contained in:
parent
e8fc7a66a3
commit
e9a5b31fa8
@ -108,6 +108,12 @@ impl Drop for Flash<'_> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Drop for FlashRegions {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
unsafe { family::lock() };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub trait FlashRegion {
|
pub trait FlashRegion {
|
||||||
const BASE: usize;
|
const BASE: usize;
|
||||||
const SIZE: usize;
|
const SIZE: usize;
|
||||||
|
Loading…
Reference in New Issue
Block a user