[][src]Struct ruspiro_register::RegisterFieldValue

pub struct RegisterFieldValue<T: RegisterType> { /* fields omitted */ }

Definition of a specific fieldvalue of a regiser. This structure allows to combine field values with bit operators like | and & to build the final value that should be written to a register

Implementations

impl RegisterFieldValue<u8>[src]

pub fn new(field: RegisterField<u8>, value: u8) -> Self[src]

Create a new fieldvalue based on the field definition and the value given

pub fn value(&self) -> u8[src]

Retrieve the register field value

pub fn raw_value(&self) -> u8[src]

Retrieve the register field raw value, means the value is returned in it's position as it appears in the register when read with the field mask applied but not shifted

pub fn mask(&self) -> u8[src]

Retrieve the field mask used with this register field. The mask is shifted to it's corresponding field position

impl RegisterFieldValue<u16>[src]

pub fn new(field: RegisterField<u16>, value: u16) -> Self[src]

Create a new fieldvalue based on the field definition and the value given

pub fn value(&self) -> u16[src]

Retrieve the register field value

pub fn raw_value(&self) -> u16[src]

Retrieve the register field raw value, means the value is returned in it's position as it appears in the register when read with the field mask applied but not shifted

pub fn mask(&self) -> u16[src]

Retrieve the field mask used with this register field. The mask is shifted to it's corresponding field position

impl RegisterFieldValue<u32>[src]

pub fn new(field: RegisterField<u32>, value: u32) -> Self[src]

Create a new fieldvalue based on the field definition and the value given

pub fn value(&self) -> u32[src]

Retrieve the register field value

pub fn raw_value(&self) -> u32[src]

Retrieve the register field raw value, means the value is returned in it's position as it appears in the register when read with the field mask applied but not shifted

pub fn mask(&self) -> u32[src]

Retrieve the field mask used with this register field. The mask is shifted to it's corresponding field position

impl RegisterFieldValue<u64>[src]

pub fn new(field: RegisterField<u64>, value: u64) -> Self[src]

Create a new fieldvalue based on the field definition and the value given

pub fn value(&self) -> u64[src]

Retrieve the register field value

pub fn raw_value(&self) -> u64[src]

Retrieve the register field raw value, means the value is returned in it's position as it appears in the register when read with the field mask applied but not shifted

pub fn mask(&self) -> u64[src]

Retrieve the field mask used with this register field. The mask is shifted to it's corresponding field position

Trait Implementations

impl BitAnd<RegisterFieldValue<u16>> for RegisterFieldValue<u16>[src]

type Output = RegisterFieldValue<u16>

The resulting type after applying the & operator.

impl BitAnd<RegisterFieldValue<u32>> for RegisterFieldValue<u32>[src]

type Output = RegisterFieldValue<u32>

The resulting type after applying the & operator.

impl BitAnd<RegisterFieldValue<u64>> for RegisterFieldValue<u64>[src]

type Output = RegisterFieldValue<u64>

The resulting type after applying the & operator.

impl BitAnd<RegisterFieldValue<u8>> for RegisterFieldValue<u8>[src]

type Output = RegisterFieldValue<u8>

The resulting type after applying the & operator.

impl BitOr<RegisterFieldValue<u16>> for RegisterFieldValue<u16>[src]

type Output = RegisterFieldValue<u16>

The resulting type after applying the | operator.

impl BitOr<RegisterFieldValue<u32>> for RegisterFieldValue<u32>[src]

type Output = RegisterFieldValue<u32>

The resulting type after applying the | operator.

impl BitOr<RegisterFieldValue<u64>> for RegisterFieldValue<u64>[src]

type Output = RegisterFieldValue<u64>

The resulting type after applying the | operator.

impl BitOr<RegisterFieldValue<u8>> for RegisterFieldValue<u8>[src]

type Output = RegisterFieldValue<u8>

The resulting type after applying the | operator.

impl<T: Clone + RegisterType> Clone for RegisterFieldValue<T>[src]

impl<T: Copy + RegisterType> Copy for RegisterFieldValue<T>[src]

impl<T: Debug + RegisterType> Debug for RegisterFieldValue<T>[src]

Auto Trait Implementations

impl<T> Send for RegisterFieldValue<T> where
    T: Send

impl<T> Sync for RegisterFieldValue<T> where
    T: Sync

impl<T> Unpin for RegisterFieldValue<T> where
    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.