pub struct Driver<'d, T: Instance, const NR_EP: usize, const SIZE: usize> { /* private fields */ }Implementations§
Source§impl<'d, T, const NR_EP: usize, const SIZE: usize> Driver<'d, T, NR_EP, SIZE>where
T: Instance,
impl<'d, T, const NR_EP: usize, const SIZE: usize> Driver<'d, T, NR_EP, SIZE>where
T: Instance,
pub fn new( _usb: Peri<'d, T>, dp: Peri<'d, impl Pin>, dm: Peri<'d, impl Pin>, ep_buffer: &'d mut [EndpointDataBuffer<SIZE>; NR_EP], ) -> Self
Sourcepub fn new_with_config(
_usb: Peri<'d, T>,
dp: Peri<'d, impl Pin>,
dm: Peri<'d, impl Pin>,
ep_buffer: &'d mut [EndpointDataBuffer<SIZE>; NR_EP],
config: Config,
) -> Self
pub fn new_with_config( _usb: Peri<'d, T>, dp: Peri<'d, impl Pin>, dm: Peri<'d, impl Pin>, ep_buffer: &'d mut [EndpointDataBuffer<SIZE>; NR_EP], config: Config, ) -> Self
Use this when board-level USB PHY or pull-up settings differ from the default 3.3 V setup.
Trait Implementations§
Source§impl<'d, T: Instance, const NR_EP: usize, const SIZE: usize> Driver<'d> for Driver<'d, T, NR_EP, SIZE>
impl<'d, T: Instance, const NR_EP: usize, const SIZE: usize> Driver<'d> for Driver<'d, T, NR_EP, SIZE>
Source§type EndpointOut = Endpoint<'d, T, Out, SIZE>
type EndpointOut = Endpoint<'d, T, Out, SIZE>
Type of the OUT endpoints for this driver.
Source§type EndpointIn = Endpoint<'d, T, In, SIZE>
type EndpointIn = Endpoint<'d, T, In, SIZE>
Type of the IN endpoints for this driver.
Source§type ControlPipe = ControlPipe<'d, T, SIZE>
type ControlPipe = ControlPipe<'d, T, SIZE>
Type of the control pipe for this driver.
Source§fn alloc_endpoint_out(
&mut self,
config: &EndpointConfig,
) -> Result<Self::EndpointOut, EndpointAllocError>
fn alloc_endpoint_out( &mut self, config: &EndpointConfig, ) -> Result<Self::EndpointOut, EndpointAllocError>
Allocates an OUT endpoint. Read more
Source§fn alloc_endpoint_in(
&mut self,
config: &EndpointConfig,
) -> Result<Self::EndpointIn, EndpointAllocError>
fn alloc_endpoint_in( &mut self, config: &EndpointConfig, ) -> Result<Self::EndpointIn, EndpointAllocError>
Allocates an IN endpoint. Read more