[−][src]Struct register::mmio::ReadWrite
Read/Write registers.
Implementations
impl<T, R> ReadWrite<T, R> where
R: RegisterLongName,
T: IntLike,
[src]
R: RegisterLongName,
T: IntLike,
pub fn get(&self) -> T
[src]
Get the raw register value
pub fn set(&self, value: T)
[src]
Set the raw register value
pub fn read(&self, field: Field<T, R>) -> T
[src]
Read the value of the given field
pub fn read_as_enum<E>(&self, field: Field<T, R>) -> Option<E> where
E: TryFromValue<T, EnumType = E>,
[src]
E: TryFromValue<T, EnumType = E>,
Read value of the given field as an enum member
pub fn extract(&self) -> LocalRegisterCopy<T, R>
[src]
Make a local copy of the register
pub fn write(&self, field: FieldValue<T, R>)
[src]
Write the value of one or more fields, overwriting the other fields with zero
pub fn modify(&self, field: FieldValue<T, R>)
[src]
Write the value of one or more fields, leaving the other fields unchanged
pub fn modify_no_read(
&self,
original: LocalRegisterCopy<T, R>,
field: FieldValue<T, R>
)
[src]
&self,
original: LocalRegisterCopy<T, R>,
field: FieldValue<T, R>
)
Write the value of one or more fields, maintaining the value of unchanged fields via a provided original value, rather than a register read.
pub fn is_set(&self, field: Field<T, R>) -> bool
[src]
Check if one or more bits in a field are set
pub fn matches_any(&self, field: FieldValue<T, R>) -> bool
[src]
Check if any specified parts of a field match
pub fn matches_all(&self, field: FieldValue<T, R>) -> bool
[src]
Check if all specified parts of a field match
Auto Trait Implementations
impl<T, R> Send for ReadWrite<T, R> where
R: Send,
T: Send,
R: Send,
T: Send,
impl<T, R = ()> !Sync for ReadWrite<T, R>
impl<T, R> Unpin for ReadWrite<T, R> where
R: Unpin,
T: Unpin,
R: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,