Struct RegisterBlock

Source
#[repr(C)]
pub struct RegisterBlock { /* private fields */ }
Expand description

Register block

Implementations§

Source§

impl RegisterBlock

Source

pub const fn dcfg(&self) -> &DCFG

0x00 - OTG_FS device configuration register (OTG_FS_DCFG)

Source

pub const fn dctl(&self) -> &DCTL

0x04 - OTG_FS device control register (OTG_FS_DCTL)

Source

pub const fn dsts(&self) -> &DSTS

0x08 - OTG_FS device status register (OTG_FS_DSTS)

Source

pub const fn diepmsk(&self) -> &DIEPMSK

0x10 - OTG_FS device IN endpoint common interrupt mask register (OTG_FS_DIEPMSK)

Source

pub const fn doepmsk(&self) -> &DOEPMSK

0x14 - OTG_FS device OUT endpoint common interrupt mask register (OTG_FS_DOEPMSK)

Source

pub const fn daint(&self) -> &DAINT

0x18 - OTG_FS device all endpoints interrupt register (OTG_FS_DAINT)

Source

pub const fn daintmsk(&self) -> &DAINTMSK

0x1c - OTG_FS all endpoints interrupt mask register (OTG_FS_DAINTMSK)

Source

pub const fn dvbusdis(&self) -> &DVBUSDIS

0x28 - OTG_FS device VBUS discharge time register

Source

pub const fn dvbuspulse(&self) -> &DVBUSPULSE

0x2c - OTG_FS device VBUS pulsing time register

Source

pub const fn diepempmsk(&self) -> &DIEPEMPMSK

0x34 - OTG_FS device IN endpoint FIFO empty interrupt mask register

Source

pub const fn diep0(&self) -> &DIEP0

0x100..0x11c - Device IN endpoint 0

Source

pub const fn diep(&self, n: usize) -> &DIEP

0x120..0x180 - Device IN endpoint X

`n` is the index of cluster in the array. `n == 0` corresponds to `DIEP1` cluster.
Source

pub fn diep_iter(&self) -> impl Iterator<Item = &DIEP>

Iterator for array of: 0x120..0x180 - Device IN endpoint X

Source

pub const fn diep1(&self) -> &DIEP

0x120..0x140 - Device IN endpoint X

Source

pub const fn diep2(&self) -> &DIEP

0x140..0x160 - Device IN endpoint X

Source

pub const fn diep3(&self) -> &DIEP

0x160..0x180 - Device IN endpoint X

Source

pub const fn doep0(&self) -> &DOEP0

0x300..0x314 - Device OUT endpoint 0

Source

pub const fn doep(&self, n: usize) -> &DOEP

0x320..0x380 - Device IN endpoint X

`n` is the index of cluster in the array. `n == 0` corresponds to `DOEP1` cluster.
Source

pub fn doep_iter(&self) -> impl Iterator<Item = &DOEP>

Iterator for array of: 0x320..0x380 - Device IN endpoint X

Source

pub const fn doep1(&self) -> &DOEP

0x320..0x340 - Device IN endpoint X

Source

pub const fn doep2(&self) -> &DOEP

0x340..0x360 - Device IN endpoint X

Source

pub const fn doep3(&self) -> &DOEP

0x360..0x380 - Device IN endpoint X

Trait Implementations§

Source§

impl Debug for RegisterBlock

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.