Implement drop for FlashRegions
This commit is contained in:
parent
e8fc7a66a3
commit
e9a5b31fa8
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue