[][src]Struct kernel::common::registers::ReadWrite

#[repr(transparent)]pub struct ReadWrite<T, R = ()> where
    R: RegisterLongName,
    T: IntLike
{ /* fields omitted */ }

Read/Write registers.

Implementations

impl<T, R> ReadWrite<T, R> where
    R: RegisterLongName,
    T: IntLike
[src]

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]

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]

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

impl<T, R = ()> !Sync for ReadWrite<T, R>

impl<T, R> Unpin for ReadWrite<T, R> where
    R: Unpin,
    T: Unpin

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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> 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.