Struct USB0

Source
pub struct USB0 { /* private fields */ }
Expand description

USB OTG (On-The-Go)

Implementations§

Source§

impl USB0

Source

pub const PTR: *const RegisterBlock = {0x60080000 as *const usb0::RegisterBlock}

Pointer to the register block

Source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

Source

pub unsafe fn steal() -> Self

Steal an instance of this peripheral

§Safety

Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.

Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.

Methods from Deref<Target = RegisterBlock>§

Source

pub fn gotgctl(&self) -> &GOTGCTL

0x00 -

Source

pub fn gotgint(&self) -> &GOTGINT

0x04 -

Source

pub fn gahbcfg(&self) -> &GAHBCFG

0x08 -

Source

pub fn gusbcfg(&self) -> &GUSBCFG

0x0c -

Source

pub fn grstctl(&self) -> &GRSTCTL

0x10 -

Source

pub fn gintsts(&self) -> &GINTSTS

0x14 -

Source

pub fn gintmsk(&self) -> &GINTMSK

0x18 -

Source

pub fn grxstsr(&self) -> &GRXSTSR

0x1c -

Source

pub fn grxstsp(&self) -> &GRXSTSP

0x20 -

Source

pub fn grxfsiz(&self) -> &GRXFSIZ

0x24 -

Source

pub fn gnptxfsiz(&self) -> &GNPTXFSIZ

0x28 -

Source

pub fn gnptxsts(&self) -> &GNPTXSTS

0x2c -

Source

pub fn gsnpsid(&self) -> &GSNPSID

0x40 -

Source

pub fn ghwcfg1(&self) -> &GHWCFG1

0x44 -

Source

pub fn ghwcfg2(&self) -> &GHWCFG2

0x48 -

Source

pub fn ghwcfg3(&self) -> &GHWCFG3

0x4c -

Source

pub fn ghwcfg4(&self) -> &GHWCFG4

0x50 -

Source

pub fn gdfifocfg(&self) -> &GDFIFOCFG

0x5c -

Source

pub fn hptxfsiz(&self) -> &HPTXFSIZ

0x100 -

Source

pub fn dieptxf(&self, n: usize) -> &DIEPTXF

0x104..0x114 -

`n` is the index of register in the array. `n == 0` corresponds to `DIEPTXF1` register.
Source

pub fn dieptxf_iter(&self) -> impl Iterator<Item = &DIEPTXF>

Iterator for array of: 0x104..0x114 -

Source

pub fn dieptxf1(&self) -> &DIEPTXF

0x104 - DIEPTXF1

Source

pub fn dieptxf2(&self) -> &DIEPTXF

0x108 - DIEPTXF2

Source

pub fn dieptxf3(&self) -> &DIEPTXF

0x10c - DIEPTXF3

Source

pub fn dieptxf4(&self) -> &DIEPTXF

0x110 - DIEPTXF4

Source

pub fn hcfg(&self) -> &HCFG

0x400 -

Source

pub fn hfir(&self) -> &HFIR

0x404 -

Source

pub fn hfnum(&self) -> &HFNUM

0x408 -

Source

pub fn hptxsts(&self) -> &HPTXSTS

0x410 -

Source

pub fn haint(&self) -> &HAINT

0x414 -

Source

pub fn haintmsk(&self) -> &HAINTMSK

0x418 -

Source

pub fn hflbaddr(&self) -> &HFLBADDR

0x41c -

Source

pub fn hprt(&self) -> &HPRT

0x440 -

Source

pub fn hc(&self, n: usize) -> &HC

0x500..0x600 - Cluster HC%s, containing HCCHAR?, HCINT?, HCINTMSK?, HCTSIZ?, HCDMA?, HCDMAB?

Source

pub fn hc_iter(&self) -> impl Iterator<Item = &HC>

Iterator for array of: 0x500..0x600 - Cluster HC%s, containing HCCHAR?, HCINT?, HCINTMSK?, HCTSIZ?, HCDMA?, HCDMAB?

Source

pub fn dcfg(&self) -> &DCFG

0x800 -

Source

pub fn dctl(&self) -> &DCTL

0x804 -

Source

pub fn dsts(&self) -> &DSTS

0x808 -

Source

pub fn diepmsk(&self) -> &DIEPMSK

0x810 -

Source

pub fn doepmsk(&self) -> &DOEPMSK

0x814 -

Source

pub fn daint(&self) -> &DAINT

0x818 -

Source

pub fn daintmsk(&self) -> &DAINTMSK

0x81c -

Source

pub fn dvbusdis(&self) -> &DVBUSDIS

0x828 -

Source

pub fn dvbuspulse(&self) -> &DVBUSPULSE

0x82c -

Source

pub fn dthrctl(&self) -> &DTHRCTL

0x830 -

Source

pub fn diepempmsk(&self) -> &DIEPEMPMSK

0x834 -

Source

pub fn in_ep0(&self) -> &IN_EP0

0x900..0x920 - Device IN endpoint 0

Source

pub fn in_ep(&self, n: usize) -> &IN_EP

0x920..0x9e0 - Device IN endpoints 1-6

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

pub fn in_ep_iter(&self) -> impl Iterator<Item = &IN_EP>

Iterator for array of: 0x920..0x9e0 - Device IN endpoints 1-6

Source

pub fn in_ep1(&self) -> &IN_EP

0x920..0x940 - Device IN endpoints 1-6

Source

pub fn in_ep2(&self) -> &IN_EP

0x940..0x960 - Device IN endpoints 1-6

Source

pub fn in_ep3(&self) -> &IN_EP

0x960..0x980 - Device IN endpoints 1-6

Source

pub fn in_ep4(&self) -> &IN_EP

0x980..0x9a0 - Device IN endpoints 1-6

Source

pub fn in_ep5(&self) -> &IN_EP

0x9a0..0x9c0 - Device IN endpoints 1-6

Source

pub fn in_ep6(&self) -> &IN_EP

0x9c0..0x9e0 - Device IN endpoints 1-6

Source

pub fn out_ep0(&self) -> &OUT_EP0

0xb00..0xb20 - Device OUT endpoint 0

Source

pub fn out_ep(&self, n: usize) -> &OUT_EP

0xb20..0xbe0 - Device OUT endpoints 1-6

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

pub fn out_ep_iter(&self) -> impl Iterator<Item = &OUT_EP>

Iterator for array of: 0xb20..0xbe0 - Device OUT endpoints 1-6

Source

pub fn out_ep1(&self) -> &OUT_EP

0xb20..0xb40 - Device OUT endpoints 1-6

Source

pub fn out_ep2(&self) -> &OUT_EP

0xb40..0xb60 - Device OUT endpoints 1-6

Source

pub fn out_ep3(&self) -> &OUT_EP

0xb60..0xb80 - Device OUT endpoints 1-6

Source

pub fn out_ep4(&self) -> &OUT_EP

0xb80..0xba0 - Device OUT endpoints 1-6

Source

pub fn out_ep5(&self) -> &OUT_EP

0xba0..0xbc0 - Device OUT endpoints 1-6

Source

pub fn out_ep6(&self) -> &OUT_EP

0xbc0..0xbe0 - Device OUT endpoints 1-6

Source

pub fn pcgcctl(&self) -> &PCGCCTL

0xe00 -

Source

pub fn fifo(&self, n: usize) -> &FIFO

0x1000..0x1040 - Read and write data to the USB FIFOs through this register.

Source

pub fn fifo_iter(&self) -> impl Iterator<Item = &FIFO>

Iterator for array of: 0x1000..0x1040 - Read and write data to the USB FIFOs through this register.

Trait Implementations§

Source§

impl Debug for USB0

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Deref for USB0

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Send for USB0

Auto Trait Implementations§

§

impl Freeze for USB0

§

impl RefUnwindSafe for USB0

§

impl !Sync for USB0

§

impl Unpin for USB0

§

impl UnwindSafe for USB0

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.