Implement drop for FlashRegions

This commit is contained in:
Rasmus Melchior Jacobsen 2023-03-25 17:00:52 +01:00
parent e8fc7a66a3
commit e9a5b31fa8

View File

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