[][src]Trait drone_core::reg::field::RegField

pub trait RegField<T: RegTag>: Token + Sync {
    type Reg: Reg<T>;
    type URegField: RegField<Urt>;
    type SRegField: RegField<Srt>;
    type CRegField: RegField<Crt>;

    const OFFSET: usize;
    const WIDTH: usize;
    fn into_unsync(self) -> Self
    where
        Self: RegField<Urt>
, { ... }
fn into_sync(self) -> Self
    where
        Self: RegField<Srt>
, { ... }
fn into_copy(self) -> Self::CRegField
    where
        T: RegAtomic
, { ... }
fn as_sync(&self) -> &Self::SRegField
    where
        T: RegAtomic
, { ... } }

The base trait for a field token of a memory-mapped register.

Associated Types

type Reg: Reg<T>

Parent register token.

type URegField: RegField<Urt>

Corresponding unsynchronized register field token.

type SRegField: RegField<Srt>

Corresponding synchronized register field token.

type CRegField: RegField<Crt>

Corresponding copyable register field token.

Loading content...

Associated Constants

const OFFSET: usize

The offset of the field inside the parent register.

const WIDTH: usize

The bit-width of the field.

Loading content...

Provided methods

fn into_unsync(self) -> Self where
    Self: RegField<Urt>, 

Converts into unsynchronized register field token.

fn into_sync(self) -> Self where
    Self: RegField<Srt>, 

Converts into synchronized register field token.

fn into_copy(self) -> Self::CRegField where
    T: RegAtomic

Converts into copyable register field token.

fn as_sync(&self) -> &Self::SRegField where
    T: RegAtomic

Returns a reference to the synchronized field token.

Loading content...

Implementors

Loading content...