Struct usbd_dfu_rt::class::DfuRuntimeClass [−][src]
pub struct DfuRuntimeClass<T: DfuRuntimeOps> { /* fields omitted */ }
Expand description
Implementation of DFU runtime class.
Implements DFU_DETACH request and will call the DfuRuntimeOps::enter
callback when
the request is received.
Implementations
impl<T: DfuRuntimeOps> DfuRuntimeClass<T>
[src]
impl<T: DfuRuntimeOps> DfuRuntimeClass<T>
[src]pub fn new<B: UsbBus>(alloc: &UsbBusAllocator<B>, dfu_ops: T) -> Self
[src]
pub fn new<B: UsbBus>(alloc: &UsbBusAllocator<B>, dfu_ops: T) -> Self
[src]Crate new DFU run-time class with the given device-specific implementations.
Trait Implementations
impl<T: DfuRuntimeOps, B: UsbBus> UsbClass<B> for DfuRuntimeClass<T>
[src]
impl<T: DfuRuntimeOps, B: UsbBus> UsbClass<B> for DfuRuntimeClass<T>
[src]fn get_configuration_descriptors(
&self,
writer: &mut DescriptorWriter<'_>
) -> Result<()>
[src]
fn get_configuration_descriptors(
&self,
writer: &mut DescriptorWriter<'_>
) -> Result<()>
[src]Called when a GET_DESCRIPTOR request is received for a configuration descriptor. When
called, the implementation should write its interface, endpoint and any extra class
descriptors into writer
. The configuration descriptor itself will be written by
UsbDevice and shouldn’t be written by classes. Read more
fn control_out(&mut self, xfer: ControlOut<'_, '_, '_, B>)
[src]
fn control_out(&mut self, xfer: ControlOut<'_, '_, '_, B>)
[src]Called when a control request is received with direction HostToDevice. Read more
fn get_bos_descriptors(
&self,
writer: &mut BosWriter<'_, '_>
) -> Result<(), UsbError>
[src]
fn get_bos_descriptors(
&self,
writer: &mut BosWriter<'_, '_>
) -> Result<(), UsbError>
[src]fn get_string(&self, index: StringIndex, lang_id: u16) -> Option<&str>
[src]
fn get_string(&self, index: StringIndex, lang_id: u16) -> Option<&str>
[src]Gets a class-specific string descriptor. Read more
fn control_in(&mut self, xfer: ControlIn<'_, '_, '_, B>)
[src]
fn control_in(&mut self, xfer: ControlIn<'_, '_, '_, B>)
[src]Called when a control request is received with direction DeviceToHost. Read more
fn endpoint_setup(&mut self, addr: EndpointAddress)
[src]
fn endpoint_setup(&mut self, addr: EndpointAddress)
[src]Called when endpoint with address addr
has received a SETUP packet. Implementing this
shouldn’t be necessary in most cases, but is provided for completeness’ sake. Read more
fn endpoint_out(&mut self, addr: EndpointAddress)
[src]
fn endpoint_out(&mut self, addr: EndpointAddress)
[src]Called when endpoint with address addr
has received data (OUT packet). Read more
fn endpoint_in_complete(&mut self, addr: EndpointAddress)
[src]
fn endpoint_in_complete(&mut self, addr: EndpointAddress)
[src]Called when endpoint with address addr
has completed transmitting data (IN packet). Read more
Auto Trait Implementations
impl<T> Send for DfuRuntimeClass<T> where
T: Send,
T: Send,
impl<T> Sync for DfuRuntimeClass<T> where
T: Sync,
T: Sync,
impl<T> Unpin for DfuRuntimeClass<T> where
T: Unpin,
T: Unpin,