embassy-nrf

Crates

git

Versions

nrf52833

Flavors

Skip to main content

Driver

Struct Driver 

Source
pub struct Driver<'d, V: VbusDetect> { /* private fields */ }
Expand description

USB driver.

Implementations§

Source§

impl<'d, V: VbusDetect> Driver<'d, V>

Source

pub fn new<T: Instance>( _usb: Peri<'d, T>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, vbus_detect: V, ) -> Self

Create a new USB driver.

Trait Implementations§

Source§

impl<'d, V: VbusDetect + 'd> Driver<'d> for Driver<'d, V>

Source§

type EndpointOut = Endpoint<'d, Out>

Type of the OUT endpoints for this driver.
Source§

type EndpointIn = Endpoint<'d, In>

Type of the IN endpoints for this driver.
Source§

type ControlPipe = ControlPipe<'d>

Type of the control pipe for this driver.
Source§

type Bus = Bus<'d, V>

Type for bus control for this driver.
Source§

fn alloc_endpoint_in( &mut self, ep_type: EndpointType, ep_addr: Option<EndpointAddress>, packet_size: u16, interval_ms: u8, ) -> Result<Self::EndpointIn, EndpointAllocError>

Allocates an IN endpoint. Read more
Source§

fn alloc_endpoint_out( &mut self, ep_type: EndpointType, ep_addr: Option<EndpointAddress>, packet_size: u16, interval_ms: u8, ) -> Result<Self::EndpointOut, EndpointAllocError>

Allocates an OUT endpoint. Read more
Source§

fn start(self, control_max_packet_size: u16) -> (Self::Bus, Self::ControlPipe)

Start operation of the USB device. Read more
Source§

fn alloc_endpoint_bulk_out_double_buffered( &mut self, ep_addr: Option<EndpointAddress>, max_packet_size: u16, ) -> Result<Self::EndpointOut, EndpointAllocError>

Allocates a double-buffered bulk OUT endpoint. Read more
Source§

fn alloc_endpoint_bulk_in_double_buffered( &mut self, ep_addr: Option<EndpointAddress>, max_packet_size: u16, ) -> Result<Self::EndpointIn, EndpointAllocError>

Allocates a double-buffered bulk IN endpoint. Read more

Auto Trait Implementations§

§

impl<'d, V> Freeze for Driver<'d, V>
where V: Freeze,

§

impl<'d, V> RefUnwindSafe for Driver<'d, V>
where V: RefUnwindSafe,

§

impl<'d, V> Send for Driver<'d, V>
where V: Send,

§

impl<'d, V> Sync for Driver<'d, V>
where V: Sync,

§

impl<'d, V> Unpin for Driver<'d, V>
where V: Unpin,

§

impl<'d, V> UnsafeUnpin for Driver<'d, V>
where V: UnsafeUnpin,

§

impl<'d, V> UnwindSafe for Driver<'d, V>
where V: UnwindSafe,

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 = !

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.