pub struct Drsr { /* private fields */ }Expand description
DRSR (Data Region Size and Enable Register)
Implementations§
Source§impl Drsr
impl Drsr
Sourcepub const ZERO: Self
pub const ZERO: Self
Creates a new instance with a raw value of 0. Equivalent to [Self::new_with_raw_value(0)].
Sourcepub const fn new_with_raw_value(value: u32) -> Drsr
pub const fn new_with_raw_value(value: u32) -> Drsr
Creates a new instance of this bitfield with the given raw value.
No checks are performed on the value, so it is possible to set bits that don’t have any accessors specified.
Sourcepub const fn subregion_mask(&self) -> u8
pub const fn subregion_mask(&self) -> u8
Sub-region bitmask
The region is divided into exactly eight equal sized subregions. Subregion 0 is the subregion at the least significant address.
A 1 bit means that sub-region is disabled.
Only applies to regions sized 256 bytes or larger.
Sourcepub const fn with_subregion_mask(&self, field_value: u8) -> Self
pub const fn with_subregion_mask(&self, field_value: u8) -> Self
Sub-region bitmask
The region is divided into exactly eight equal sized subregions. Subregion 0 is the subregion at the least significant address.
A 1 bit means that sub-region is disabled.
Only applies to regions sized 256 bytes or larger.
Sourcepub fn set_subregion_mask(&mut self, field_value: u8)
pub fn set_subregion_mask(&mut self, field_value: u8)
Sub-region bitmask
The region is divided into exactly eight equal sized subregions. Subregion 0 is the subregion at the least significant address.
A 1 bit means that sub-region is disabled.
Only applies to regions sized 256 bytes or larger.
Sourcepub const fn region_size(&self) -> RegionSize
pub const fn region_size(&self) -> RegionSize
Region Size
Sourcepub const fn with_region_size(&self, field_value: RegionSize) -> Self
pub const fn with_region_size(&self, field_value: RegionSize) -> Self
Region Size
Sourcepub fn set_region_size(&mut self, field_value: RegionSize)
pub fn set_region_size(&mut self, field_value: RegionSize)
Region Size
Sourcepub const fn with_enabled(&self, field_value: bool) -> Self
pub const fn with_enabled(&self, field_value: bool) -> Self
Is region enabled?
Sourcepub fn set_enabled(&mut self, field_value: bool)
pub fn set_enabled(&mut self, field_value: bool)
Is region enabled?