pub struct TestClass<'a, B: UsbBus> { /* fields omitted */ }
Test USB class for testing USB driver implementations. Supports various endpoint types and
requests for testing USB peripheral drivers on actual hardware.
Convenience method to create a UsbDevice that is configured correctly for TestClass.
Must be called after polling the UsbDevice.
Called after a USB reset after the bus reset sequence is complete.
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
Gets a class-specific string descriptor. Read more
Called when endpoint with address addr
has completed transmitting data (IN packet). Read more
Called when endpoint with address addr
has received data (OUT packet). Read more
Called when a control request is received with direction DeviceToHost. Read more
Called when a control request is received with direction HostToDevice. Read more
Called whenever the UsbDevice
is polled.
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
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static