pub struct Mpu { /* private fields */ }Expand description
Represents our PMSAv7 MPU
This type is not [Send] because it is a per-core type and should not be moved across cores on an SMP system.
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