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

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

Read-only and write-only registers aliased to the same address.

Unlike the ReadWrite register, this represents a register which has different meanings based on if it is written or read. This might be found on a device where control and status registers are accessed via the same memory address via writes and reads, respectively.

Implementations

impl<T, R, W> Aliased<T, R, W> where
    R: RegisterLongName,
    T: IntLike,
    W: RegisterLongName
[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, W>)[src]

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

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, W> Send for Aliased<T, R, W> where
    R: Send,
    T: Send,
    W: Send

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

impl<T, R, W> Unpin for Aliased<T, R, W> where
    R: Unpin,
    T: Unpin,
    W: 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.