[][src]Struct cortex_mpu::Size

pub struct 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]

impl PartialOrd<Size> for Size[src]

impl Debug for Size[src]

impl Copy for Size[src]

impl Clone for Size[src]

Auto Trait Implementations

impl Unpin for Size

impl Send for Size

impl Sync for Size

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self