Type Alias rp2040_pac::ppb::mpu_rasr::W

source ·
pub type W = W<MPU_RASR_SPEC>;
Expand description

Register MPU_RASR writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

source§

impl W

source

pub fn enable(&mut self) -> ENABLE_W<'_, MPU_RASR_SPEC>

Bit 0 - Enables the region.

source

pub fn size(&mut self) -> SIZE_W<'_, MPU_RASR_SPEC>

Bits 1:5 - Indicates the region size. Region size in bytes = 2^(SIZE+1). The minimum permitted value is 7 (b00111) = 256Bytes

source

pub fn srd(&mut self) -> SRD_W<'_, MPU_RASR_SPEC>

Bits 8:15 - Subregion Disable. For regions of 256 bytes or larger, each bit of this field controls whether one of the eight equal subregions is enabled.

source

pub fn attrs(&mut self) -> ATTRS_W<'_, MPU_RASR_SPEC>

Bits 16:31 - The MPU Region Attribute field. Use to define the region attribute control.
28 = XN: Instruction access disable bit:
0 = Instruction fetches enabled.
1 = Instruction fetches disabled.
26:24 = AP: Access permission field
18 = S: Shareable bit
17 = C: Cacheable bit
16 = B: Bufferable bit

source

pub unsafe fn bits(&mut self, bits: u32) -> &mut Self

Writes raw bits to the register.

§Safety

Passing incorrect value can cause undefined behaviour. See reference manual