[−][src]Struct cortex_mpu::Size
Memory region size value (5 bits).
Memory regions must have a size that is a power of two, and their base address must be naturally aligned (ie. aligned to their size).
There is a core-specific minimum size exposed as Mpu::MIN_REGION_SIZE
.
Methods
impl Size
[src]
pub const S32B: Self
[src]
pub const S64B: Self
[src]
pub const S128B: Self
[src]
pub const S256B: Self
[src]
pub const S512B: Self
[src]
pub const S1K: Self
[src]
pub const S2K: Self
[src]
pub const S4K: Self
[src]
pub const S8K: Self
[src]
pub const S16K: Self
[src]
pub const S32K: Self
[src]
pub const S64K: Self
[src]
pub const S128K: Self
[src]
pub const S256K: Self
[src]
pub const S512K: Self
[src]
pub const S1M: Self
[src]
pub const S2M: Self
[src]
pub const S4M: Self
[src]
pub const S8M: Self
[src]
pub const S16M: Self
[src]
pub const S32M: Self
[src]
pub const S64M: Self
[src]
pub const S128M: Self
[src]
pub const S256M: Self
[src]
pub const S512M: Self
[src]
pub const S1G: Self
[src]
pub const S2G: Self
[src]
pub const S4G: Self
[src]
The entire 4 GiB memory space.
pub const fn from_raw_bits(bits: u8) -> Self
[src]
Creates a Size
from a raw 5-bit value.
The bits
encode a region size of 2^(bits + 1)
. For example, a 1 KiB region would use
0b01001
(9): 2^(9+1) = 2^10 = 1024
.
pub const fn bits(self) -> u8
[src]
Returns the raw 5-bit value encoding the region size.
Trait Implementations
impl PartialEq<Size> for Size
[src]
impl Eq for Size
[src]
impl Ord for Size
[src]
fn cmp(&self, other: &Size) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialOrd<Size> for Size
[src]
fn partial_cmp(&self, other: &Size) -> Option<Ordering>
[src]
fn lt(&self, other: &Size) -> bool
[src]
fn le(&self, other: &Size) -> bool
[src]
fn gt(&self, other: &Size) -> bool
[src]
fn ge(&self, other: &Size) -> bool
[src]
impl Debug for Size
[src]
impl Copy for Size
[src]
impl Clone for Size
[src]
fn clone(&self) -> Size
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self