pub struct Mpu();Expand description
Represents our PMSAv7 MPU
Implementations§
Source§impl Mpu
impl Mpu
Sourcepub unsafe fn new() -> Mpu
pub unsafe fn new() -> Mpu
Create an MPU handle
§Safety
Only create one of these at any given time, as they access shared mutable state within the processor and do read-modify-writes on that state.
Sourcepub fn num_iregions(&self) -> u8
pub fn num_iregions(&self) -> u8
How many MPU instruction regions are there?
Sourcepub fn num_dregions(&self) -> u8
pub fn num_dregions(&self) -> u8
How many MPU data/unified regions are there?
Sourcepub fn is_unified(&self) -> bool
pub fn is_unified(&self) -> bool
Do we have a unified MPU?
Sourcepub fn get_iregion(&mut self, idx: u8) -> Option<Region>
pub fn get_iregion(&mut self, idx: u8) -> Option<Region>
Get an instruction region
Sourcepub fn get_dregion(&mut self, idx: u8) -> Option<Region>
pub fn get_dregion(&mut self, idx: u8) -> Option<Region>
Get a data/unified region
Auto Trait Implementations§
impl Freeze for Mpu
impl RefUnwindSafe for Mpu
impl Send for Mpu
impl Sync for Mpu
impl Unpin for Mpu
impl UnwindSafe for Mpu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more