Trait drone_core::reg::Reg [−][src]
pub trait Reg<T: RegTag>: Token + Sync { type Val: Bitfield; type UReg: Reg<Urt>; type SReg: Reg<Srt>; type CReg: Reg<Crt>; const ADDRESS: usize; const RESET: <Self::Val as Bitfield>::Bits; unsafe fn val_from(bits: <Self::Val as Bitfield>::Bits) -> Self::Val; fn into_unsync(self) -> Self::UReg
where
T: RegOwned, { ... } fn into_sync(self) -> Self::SReg
where
T: RegOwned, { ... } fn into_copy(self) -> Self::CReg { ... } fn as_sync(&self) -> &Self::SReg
where
T: RegAtomic, { ... } fn default_val(&self) -> Self::Val { ... } }
The base trait for a memory-mapped register token.
Associated Types
type Val: Bitfield
[src]
Opaque storage for register values.
This type is only a storage, without methods to read or write the stored
bits. It should be used in conjunction with RegHold
or register
field
s.
See also Hold
.
type UReg: Reg<Urt>
[src]
Corresponding unsynchronized register token.
type SReg: Reg<Srt>
[src]
Corresponding synchronized register token.
type CReg: Reg<Crt>
[src]
Corresponding copyable register token.
Associated Constants
const ADDRESS: usize
[src]
The register address in memory.
const RESET: <Self::Val as Bitfield>::Bits
[src]
The register default value.
Required methods
Loading content...Provided methods
fn into_unsync(self) -> Self::UReg where
T: RegOwned,
[src]
T: RegOwned,
Converts into unsynchronized register token.
fn into_sync(self) -> Self::SReg where
T: RegOwned,
[src]
T: RegOwned,
Converts into synchronized register token.
fn into_copy(self) -> Self::CReg
[src]
Converts into copyable register token.
fn as_sync(&self) -> &Self::SReg where
T: RegAtomic,
[src]
T: RegAtomic,
Returns a reference to the synchronized register token.
fn default_val(&self) -> Self::Val
[src]
Creates a new opaque register value, and initializes it with the reset value.
See also default
.