pub struct MPUAllocator { /* private fields */ }Expand description
MPU Region Allocator
Implementations§
Source§impl MPUAllocator
impl MPUAllocator
Sourcepub fn new(hw_caps: HardwareCapabilities) -> Self
pub fn new(hw_caps: HardwareCapabilities) -> Self
Create a new allocator
Sourcepub fn allocate(
&mut self,
request: MPUAllocationRequest,
) -> Result<Vec<MPURegion>>
pub fn allocate( &mut self, request: MPUAllocationRequest, ) -> Result<Vec<MPURegion>>
Allocate MPU regions for a memory
Sourcepub fn allocated_regions(&self) -> &[MPURegion]
pub fn allocated_regions(&self) -> &[MPURegion]
Get all allocated regions
Sourcepub fn available_regions(&self) -> u8
pub fn available_regions(&self) -> u8
Get number of available regions
Sourcepub fn generate_init_code(&self) -> String
pub fn generate_init_code(&self) -> String
Generate C initialization code for all regions
Auto Trait Implementations§
impl Freeze for MPUAllocator
impl RefUnwindSafe for MPUAllocator
impl Send for MPUAllocator
impl Sync for MPUAllocator
impl Unpin for MPUAllocator
impl UnsafeUnpin for MPUAllocator
impl UnwindSafe for MPUAllocator
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