embassy-nrf

Crates

git

Versions

nrf5340-app-s

Flavors

embassy_nrf::pac::usbd

Struct Usbd

pub struct Usbd { /* private fields */ }
Expand description

Universal serial bus device 0

Implementations§

§

impl Usbd

pub const unsafe fn from_ptr(ptr: *mut ()) -> Usbd

pub const fn as_ptr(&self) -> *mut ()

pub const fn tasks_startepin(self, n: usize) -> Reg<u32, W>

Description collection: Captures the EPIN[n].PTR and EPIN[n].MAXCNT registers values, and enables endpoint IN n to respond to traffic from host

pub const fn tasks_startisoin(self) -> Reg<u32, W>

Captures the ISOIN.PTR and ISOIN.MAXCNT registers values, and enables sending data on ISO endpoint

pub const fn tasks_startepout(self, n: usize) -> Reg<u32, W>

Description collection: Captures the EPOUT[n].PTR and EPOUT[n].MAXCNT registers values, and enables endpoint n to respond to traffic from host

pub const fn tasks_startisoout(self) -> Reg<u32, W>

Captures the ISOOUT.PTR and ISOOUT.MAXCNT registers values, and enables receiving of data on ISO endpoint

pub const fn tasks_ep0rcvout(self) -> Reg<u32, W>

Allows OUT data stage on control endpoint 0

pub const fn tasks_ep0status(self) -> Reg<u32, W>

Allows status stage on control endpoint 0

pub const fn tasks_ep0stall(self) -> Reg<u32, W>

Stalls data and status stage on control endpoint 0

pub const fn tasks_dpdmdrive(self) -> Reg<u32, W>

Forces D+ and D- lines into the state defined in the DPDMVALUE register

pub const fn tasks_dpdmnodrive(self) -> Reg<u32, W>

Stops forcing D+ and D- lines into any state (USB engine takes control)

pub const fn subscribe_startepin(self, n: usize) -> Reg<Subscribe, RW>

Description collection: Subscribe configuration for task STARTEPIN[n]

pub const fn subscribe_startisoin(self) -> Reg<Subscribe, RW>

Subscribe configuration for task STARTISOIN

pub const fn subscribe_startepout(self, n: usize) -> Reg<Subscribe, RW>

Description collection: Subscribe configuration for task STARTEPOUT[n]

pub const fn subscribe_startisoout(self) -> Reg<Subscribe, RW>

Subscribe configuration for task STARTISOOUT

pub const fn subscribe_ep0rcvout(self) -> Reg<Subscribe, RW>

Subscribe configuration for task EP0RCVOUT

pub const fn subscribe_ep0status(self) -> Reg<Subscribe, RW>

Subscribe configuration for task EP0STATUS

pub const fn subscribe_ep0stall(self) -> Reg<Subscribe, RW>

Subscribe configuration for task EP0STALL

pub const fn subscribe_dpdmdrive(self) -> Reg<Subscribe, RW>

Subscribe configuration for task DPDMDRIVE

pub const fn subscribe_dpdmnodrive(self) -> Reg<Subscribe, RW>

Subscribe configuration for task DPDMNODRIVE

pub const fn events_usbreset(self) -> Reg<u32, RW>

Signals that a USB reset condition has been detected on USB lines

pub const fn events_started(self) -> Reg<u32, RW>

Confirms that the EPIN[n].PTR and EPIN[n].MAXCNT, or EPOUT[n].PTR and EPOUT[n].MAXCNT registers have been captured on all endpoints reported in the EPSTATUS register

pub const fn events_endepin(self, n: usize) -> Reg<u32, RW>

Description collection: The whole EPIN[n] buffer has been consumed. The buffer can be accessed safely by software.

pub const fn events_ep0datadone(self) -> Reg<u32, RW>

An acknowledged data transfer has taken place on the control endpoint

pub const fn events_endisoin(self) -> Reg<u32, RW>

The whole ISOIN buffer has been consumed. The buffer can be accessed safely by software.

pub const fn events_endepout(self, n: usize) -> Reg<u32, RW>

Description collection: The whole EPOUT[n] buffer has been consumed. The buffer can be accessed safely by software.

pub const fn events_endisoout(self) -> Reg<u32, RW>

The whole ISOOUT buffer has been consumed. The buffer can be accessed safely by software.

pub const fn events_sof(self) -> Reg<u32, RW>

Signals that a SOF (start of frame) condition has been detected on USB lines

pub const fn events_usbevent(self) -> Reg<u32, RW>

An event or an error not covered by specific events has occurred. Check EVENTCAUSE register to find the cause.

pub const fn events_ep0setup(self) -> Reg<u32, RW>

A valid SETUP token has been received (and acknowledged) on the control endpoint

pub const fn events_epdata(self) -> Reg<u32, RW>

A data transfer has occurred on a data endpoint, indicated by the EPDATASTATUS register

pub const fn publish_usbreset(self) -> Reg<Publish, RW>

Publish configuration for event USBRESET

pub const fn publish_started(self) -> Reg<Publish, RW>

Publish configuration for event STARTED

pub const fn publish_endepin(self, n: usize) -> Reg<Publish, RW>

Description collection: Publish configuration for event ENDEPIN[n]

pub const fn publish_ep0datadone(self) -> Reg<Publish, RW>

Publish configuration for event EP0DATADONE

pub const fn publish_endisoin(self) -> Reg<Publish, RW>

Publish configuration for event ENDISOIN

pub const fn publish_endepout(self, n: usize) -> Reg<Publish, RW>

Description collection: Publish configuration for event ENDEPOUT[n]

pub const fn publish_endisoout(self) -> Reg<Publish, RW>

Publish configuration for event ENDISOOUT

pub const fn publish_sof(self) -> Reg<Publish, RW>

Publish configuration for event SOF

pub const fn publish_usbevent(self) -> Reg<Publish, RW>

Publish configuration for event USBEVENT

pub const fn publish_ep0setup(self) -> Reg<Publish, RW>

Publish configuration for event EP0SETUP

pub const fn publish_epdata(self) -> Reg<Publish, RW>

Publish configuration for event EPDATA

pub const fn shorts(self) -> Reg<Shorts, RW>

Shortcuts between local events and tasks

pub const fn inten(self) -> Reg<Int, RW>

Enable or disable interrupt

pub const fn intenset(self) -> Reg<Int, RW>

Enable interrupt

pub const fn intenclr(self) -> Reg<Int, RW>

Disable interrupt

pub const fn eventcause(self) -> Reg<Eventcause, RW>

Details on what caused the USBEVENT event

pub const fn halted(self) -> Halted

Unspecified

pub const fn epstatus(self) -> Reg<Epstatus, RW>

Provides information on which endpoint’s EasyDMA registers have been captured

pub const fn epdatastatus(self) -> Reg<Epdatastatus, RW>

Provides information on which endpoint(s) an acknowledged data transfer has occurred (EPDATA event)

pub const fn usbaddr(self) -> Reg<Usbaddr, R>

Device USB address

pub const fn bmrequesttype(self) -> Reg<Bmrequesttype, R>

SETUP data, byte 0, bmRequestType

pub const fn brequest(self) -> Reg<Brequest, R>

SETUP data, byte 1, bRequest

pub const fn wvaluel(self) -> Reg<Wvaluel, R>

SETUP data, byte 2, LSB of wValue

pub const fn wvalueh(self) -> Reg<Wvalueh, R>

SETUP data, byte 3, MSB of wValue

pub const fn windexl(self) -> Reg<Windexl, R>

SETUP data, byte 4, LSB of wIndex

pub const fn windexh(self) -> Reg<Windexh, R>

SETUP data, byte 5, MSB of wIndex

pub const fn wlengthl(self) -> Reg<Wlengthl, R>

SETUP data, byte 6, LSB of wLength

pub const fn wlengthh(self) -> Reg<Wlengthh, R>

SETUP data, byte 7, MSB of wLength

pub const fn size(self) -> Size

Unspecified

pub const fn enable(self) -> Reg<Enable, RW>

Enable USB

pub const fn usbpullup(self) -> Reg<Usbpullup, RW>

Control of the USB pull-up

pub const fn dpdmvalue(self) -> Reg<Dpdmvalue, RW>

State D+ and D- lines will be forced into by the DPDMDRIVE task. The DPDMNODRIVE task reverts the control of the lines to MAC IP (no forcing).

pub const fn dtoggle(self) -> Reg<Dtoggle, RW>

Data toggle control and status

pub const fn epinen(self) -> Reg<Epinen, RW>

Endpoint IN enable

pub const fn epouten(self) -> Reg<Epouten, RW>

Endpoint OUT enable

pub const fn epstall(self) -> Reg<Epstall, W>

STALL endpoints

pub const fn isosplit(self) -> Reg<Isosplit, RW>

Controls the split of ISO buffers

pub const fn framecntr(self) -> Reg<Framecntr, R>

Returns the current value of the start of frame counter

pub const fn lowpower(self) -> Reg<Lowpower, RW>

Controls USBD peripheral low power mode during USB suspend

pub const fn isoinconfig(self) -> Reg<Isoinconfig, RW>

Controls the response of the ISO IN endpoint to an IN token when no data is ready to be sent

pub const fn epin(self, n: usize) -> Epin

Unspecified

pub const fn isoin(self) -> Isoin

Unspecified

pub const fn epout(self, n: usize) -> Epout

Unspecified

pub const fn isoout(self) -> Isoout

Unspecified

Trait Implementations§

§

impl Clone for Usbd

§

fn clone(&self) -> Usbd

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl PartialEq for Usbd

§

fn eq(&self, other: &Usbd) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Copy for Usbd

§

impl Eq for Usbd

§

impl Send for Usbd

§

impl StructuralPartialEq for Usbd

§

impl Sync for Usbd

Auto Trait Implementations§

§

impl Freeze for Usbd

§

impl RefUnwindSafe for Usbd

§

impl Unpin for Usbd

§

impl UnwindSafe for Usbd

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> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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<Src, Dst> LosslessTryInto<Dst> for Src
where Dst: LosslessTryFrom<Src>,

Source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
Source§

impl<Src, Dst> LossyInto<Dst> for Src
where Dst: LossyFrom<Src>,

Source§

fn lossy_into(self) -> Dst

Performs the conversion.
Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
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.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.