Struct esp32s2::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 -

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 hcchar0(&self) -> &HCCHAR0

0x500 -

source

pub fn hcint0(&self) -> &HCINT0

0x508 -

source

pub fn hcintmsk0(&self) -> &HCINTMSK0

0x50c -

source

pub fn hctsiz0(&self) -> &HCTSIZ0

0x510 -

source

pub fn hcdma0(&self) -> &HCDMA0

0x514 -

source

pub fn hcdmab0(&self) -> &HCDMAB0

0x51c -

source

pub fn hcchar1(&self) -> &HCCHAR1

0x520 -

source

pub fn hcint1(&self) -> &HCINT1

0x528 -

source

pub fn hcintmsk1(&self) -> &HCINTMSK1

0x52c -

source

pub fn hctsiz1(&self) -> &HCTSIZ1

0x530 -

source

pub fn hcdma1(&self) -> &HCDMA1

0x534 -

source

pub fn hcdmab1(&self) -> &HCDMAB1

0x53c -

source

pub fn hcchar2(&self) -> &HCCHAR2

0x540 -

source

pub fn hcint2(&self) -> &HCINT2

0x548 -

source

pub fn hcintmsk2(&self) -> &HCINTMSK2

0x54c -

source

pub fn hctsiz2(&self) -> &HCTSIZ2

0x550 -

source

pub fn hcdma2(&self) -> &HCDMA2

0x554 -

source

pub fn hcdmab2(&self) -> &HCDMAB2

0x55c -

source

pub fn hcchar3(&self) -> &HCCHAR3

0x560 -

source

pub fn hcint3(&self) -> &HCINT3

0x568 -

source

pub fn hcintmsk3(&self) -> &HCINTMSK3

0x56c -

source

pub fn hctsiz3(&self) -> &HCTSIZ3

0x570 -

source

pub fn hcdma3(&self) -> &HCDMA3

0x574 -

source

pub fn hcdmab3(&self) -> &HCDMAB3

0x57c -

source

pub fn hcchar4(&self) -> &HCCHAR4

0x580 -

source

pub fn hcint4(&self) -> &HCINT4

0x588 -

source

pub fn hcintmsk4(&self) -> &HCINTMSK4

0x58c -

source

pub fn hctsiz4(&self) -> &HCTSIZ4

0x590 -

source

pub fn hcdma4(&self) -> &HCDMA4

0x594 -

source

pub fn hcdmab4(&self) -> &HCDMAB4

0x59c -

source

pub fn hcchar5(&self) -> &HCCHAR5

0x5a0 -

source

pub fn hcint5(&self) -> &HCINT5

0x5a8 -

source

pub fn hcintmsk5(&self) -> &HCINTMSK5

0x5ac -

source

pub fn hctsiz5(&self) -> &HCTSIZ5

0x5b0 -

source

pub fn hcdma5(&self) -> &HCDMA5

0x5b4 -

source

pub fn hcdmab5(&self) -> &HCDMAB5

0x5bc -

source

pub fn hcchar6(&self) -> &HCCHAR6

0x5c0 -

source

pub fn hcint6(&self) -> &HCINT6

0x5c8 -

source

pub fn hcintmsk6(&self) -> &HCINTMSK6

0x5cc -

source

pub fn hctsiz6(&self) -> &HCTSIZ6

0x5d0 -

source

pub fn hcdma6(&self) -> &HCDMA6

0x5d4 -

source

pub fn hcdmab6(&self) -> &HCDMAB6

0x5dc -

source

pub fn hcchar7(&self) -> &HCCHAR7

0x5e0 -

source

pub fn hcint7(&self) -> &HCINT7

0x5e8 -

source

pub fn hcintmsk7(&self) -> &HCINTMSK7

0x5ec -

source

pub fn hctsiz7(&self) -> &HCTSIZ7

0x5f0 -

source

pub fn hcdma7(&self) -> &HCDMA7

0x5f4 -

source

pub fn hcdmab7(&self) -> &HCDMAB7

0x5fc -

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

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

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

§

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