#[repr(C)]
pub struct RegisterBlock {
Show 18 fields pub ctl0: CTL0, pub ctl1: CTL1, pub smcfg: SMCFG, pub dmainten: DMAINTEN, pub intf: INTF, pub swevg: SWEVG, pub chctl2: CHCTL2, pub cnt: CNT, pub psc: PSC, pub car: CAR, pub crep: CREP, pub ch0cv: CH0CV, pub ch1cv: CH1CV, pub ch2cv: CH2CV, pub ch3cv: CH3CV, pub cchp: CCHP, pub dmacfg: DMACFG, pub dmatb: DMATB, /* private fields */
}
Expand description

Register block

Fields§

§ctl0: CTL0

0x00 - control register 0

§ctl1: CTL1

0x04 - control register 1

§smcfg: SMCFG

0x08 - slave mode configuration register

§dmainten: DMAINTEN

0x0c - DMA/Interrupt enable register

§intf: INTF

0x10 - Interrupt flag register

§swevg: SWEVG

0x14 - Software event generation register

§chctl2: CHCTL2

0x20 - Channel control register 2

§cnt: CNT

0x24 - counter

§psc: PSC

0x28 - prescaler

§car: CAR

0x2c - Counter auto reload register

§crep: CREP

0x30 - Counter repetition register

§ch0cv: CH0CV

0x34 - Channel 0 capture/compare value register

§ch1cv: CH1CV

0x38 - Channel 1 capture/compare value register

§ch2cv: CH2CV

0x3c - Channel 2 capture/compare value register

§ch3cv: CH3CV

0x40 - Channel 3 capture/compare value register

§cchp: CCHP

0x44 - channel complementary protection register

§dmacfg: DMACFG

0x48 - DMA configuration register

§dmatb: DMATB

0x4c - DMA transfer buffer register

Implementations§

source§

impl RegisterBlock

source

pub const fn chctl0_input(&self) -> &CHCTL0_INPUT

0x18 - Channel control register 0 (input mode)

source

pub const fn chctl0_output(&self) -> &CHCTL0_OUTPUT

0x18 - Channel control register 0 (output mode)

source

pub const fn chctl1_input(&self) -> &CHCTL1_INPUT

0x1c - Channel control register 1 (input mode)

source

pub const fn chctl1_output(&self) -> &CHCTL1_OUTPUT

0x1c - Channel control register 1 (output mode)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.