nrf-pac

Crates

git

Versions

nrf52833

Flavors

nrf_pac::usbd

Struct Usbd

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

Universal serial bus device

Implementations§

Source§

impl Usbd

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Allows OUT data stage on control endpoint 0

Source

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

Allows status stage on control endpoint 0

Source

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

Stalls data and status stage on control endpoint 0

Source

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

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

Source

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

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

Source

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

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

Source

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

Source

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.

Source

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

An acknowledged data transfer has taken place on the control endpoint

Source

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

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

Source

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.

Source

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

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

Source

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

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

Source

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.

Source

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

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

Source

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

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

Source

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

Shortcuts between local events and tasks

Source

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

Enable or disable interrupt

Source

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

Enable interrupt

Source

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

Disable interrupt

Source

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

Details on what caused the USBEVENT event

Source

pub const fn halted(self) -> Halted

Unspecified

Source

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

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

Source

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

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

Source

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

Device USB address

Source

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

SETUP data, byte 0, bmRequestType

Source

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

SETUP data, byte 1, bRequest

Source

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

SETUP data, byte 2, LSB of wValue

Source

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

SETUP data, byte 3, MSB of wValue

Source

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

SETUP data, byte 4, LSB of wIndex

Source

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

SETUP data, byte 5, MSB of wIndex

Source

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

SETUP data, byte 6, LSB of wLength

Source

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

SETUP data, byte 7, MSB of wLength

Source

pub const fn size(self) -> Size

Unspecified

Source

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

Enable USB

Source

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

Control of the USB pull-up

Source

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).

Source

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

Data toggle control and status

Source

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

Endpoint IN enable

Source

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

Endpoint OUT enable

Source

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

STALL endpoints

Source

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

Controls the split of ISO buffers

Source

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

Returns the current value of the start of frame counter

Source

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

Controls USBD peripheral low power mode during USB suspend

Source

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

Source

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

Unspecified

Source

pub const fn isoin(self) -> Isoin

Unspecified

Source

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

Unspecified

Source

pub const fn isoout(self) -> Isoout

Unspecified

Trait Implementations§

Source§

impl Clone for Usbd

Source§

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
Source§

impl PartialEq for Usbd

Source§

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.
Source§

impl Copy for Usbd

Source§

impl Eq for Usbd

Source§

impl Send for Usbd

Source§

impl StructuralPartialEq for Usbd

Source§

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> 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> CloneToUninit for T
where T: Clone,

Source§

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

🔬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<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.