Type Alias PDFlags

Source
pub type PDFlags = LocalRegisterCopy<u32, Register>;

Aliased Type§

struct PDFlags { /* private fields */ }

Implementations

Source§

impl<T, R> LocalRegisterCopy<T, R>

Source

pub const fn new(value: T) -> LocalRegisterCopy<T, R>

Source

pub fn get(&self) -> T

Get the raw register value

Source

pub fn set(&mut self, value: T)

Set the raw register value

Source

pub fn read(&self, field: Field<T, R>) -> T

Read the value of the given field

Source

pub fn read_as_enum<E>(&self, field: Field<T, R>) -> Option<E>
where E: TryFromValue<T, EnumType = E>,

Read value of the given field as an enum member

Source

pub fn write(&mut self, field: FieldValue<T, R>)

Write the value of one or more fields, overwriting the other fields with zero

Source

pub fn modify(&mut self, field: FieldValue<T, R>)

Write the value of one or more fields, leaving the other fields unchanged

Source

pub fn is_set(&self, field: Field<T, R>) -> bool

Check if one or more bits in a field are set

Source

pub fn any_matching_bits_set(&self, field: FieldValue<T, R>) -> bool

Check if any bits corresponding to the mask in the passed FieldValue are set.

Source

pub fn matches_all(&self, field: FieldValue<T, R>) -> bool

Check if all specified parts of a field match

Source

pub fn matches_any(&self, fields: &[FieldValue<T, R>]) -> bool

Check if any of the passed parts of a field exactly match the contained value. This allows for matching on unset bits, or matching on specific values in multi-bit fields.

Source

pub fn bitand(&self, rhs: T) -> LocalRegisterCopy<T, R>

Do a bitwise AND operation of the stored value and the passed in value and return a new LocalRegisterCopy.

Source

pub fn debug(&self) -> RegisterDebugValue<T, R>
where R: RegisterDebugInfo<T>,

Trait Implementations

Source§

impl<T, R> Clone for LocalRegisterCopy<T, R>

Source§

fn clone(&self) -> LocalRegisterCopy<T, R>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T, R> Debug for LocalRegisterCopy<T, R>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T, R> Copy for LocalRegisterCopy<T, R>