[][src]Trait drone_cortex_m::reg::prelude::Reg

pub trait Reg<T>: Token + Sync where
    T: RegTag
{ 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

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>

Corresponding unsynchronized register token.

type SReg: Reg<Srt>

Corresponding synchronized register token.

type CReg: Reg<Crt>

Corresponding copyable register token.

Loading content...

Associated Constants

const ADDRESS: usize

The register address in memory.

const RESET: <Self::Val as Bitfield>::Bits

The register default value.

Loading content...

Required methods

unsafe fn val_from(bits: <Self::Val as Bitfield>::Bits) -> Self::Val

Creates a new instance of [Reg::Val] from raw bits.

Safety

This function is unsafe because it doesn't require a token.

Loading content...

Provided methods

fn into_unsync(self) -> Self::UReg where
    T: RegOwned

Converts into unsynchronized register token.

fn into_sync(self) -> Self::SReg where
    T: RegOwned

Converts into synchronized register token.

fn into_copy(self) -> Self::CReg

Converts into copyable register token.

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

Returns a reference to the synchronized register token.

fn default_val(&self) -> Self::Val

Creates a new opaque register value, and initializes it with the reset value.

See also default.

Loading content...

Implementors

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::dwt::Cyccnt<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::fpu::Cpacr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::fpu::Fpcar<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::fpu::Fpccr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::fpu::Fpdscr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::itm::Lar<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::itm::Tcr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::itm::Tpr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::mpu::Ctrl<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::mpu::Rasr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::mpu::Rbar<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::mpu::Rnr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::mpu::Type<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Afsr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Aircr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Bfar<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Bfsr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Ccr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Cpuid<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Demcr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Dfsr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Hfsr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Icsr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Mmfar<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Mmfsr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Scr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Shcsr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Shpr1<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Shpr2<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Shpr3<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Ufsr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::scb::Vtor<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::stk::Calib<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::stk::Ctrl<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::stk::Load<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::stk::Val<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::tpiu::Acpr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::tpiu::Ffcr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

impl<_T: RegTag> Reg<_T> for drone_cortex_m::map::reg::tpiu::Sppr<_T>[src]

type Val = Val

type UReg = Reg<Urt>

type SReg = Reg<Srt>

type CReg = Reg<Crt>

Loading content...