[−][src]Struct arduino_mkrzero::usb::usb_device::test_class::TestClass
Test USB class for testing USB driver implementations. Supports various endpoint types and requests for testing USB peripheral drivers on actual hardware.
Implementations
impl<'_, B> TestClass<'_, B> where
B: UsbBus,
[src]
B: UsbBus,
pub fn new(alloc: &UsbBusAllocator<B>) -> TestClass<'_, B>
[src]
Creates a new TestClass.
pub fn make_device(
&'a self,
usb_bus: &'b UsbBusAllocator<B>
) -> UsbDevice<'b, B>
[src]
&'a self,
usb_bus: &'b UsbBusAllocator<B>
) -> UsbDevice<'b, B>
Convenience method to create a UsbDevice that is configured correctly for TestClass.
pub fn poll(&mut self)
[src]
Must be called after polling the UsbDevice.
Trait Implementations
impl<'_, B> UsbClass<B> for TestClass<'_, B> where
B: UsbBus,
[src]
B: UsbBus,
pub fn reset(&mut self)
[src]
pub fn get_configuration_descriptors(
&self,
writer: &mut DescriptorWriter<'_>
) -> Result<(), UsbError>
[src]
&self,
writer: &mut DescriptorWriter<'_>
) -> Result<(), UsbError>
pub fn get_string(&self, index: StringIndex, lang_id: u16) -> Option<&str>
[src]
pub fn endpoint_in_complete(&mut self, addr: EndpointAddress)
[src]
pub fn endpoint_out(&mut self, addr: EndpointAddress)
[src]
pub fn control_in(&mut self, xfer: ControlIn<'_, '_, '_, B>)
[src]
pub fn control_out(&mut self, xfer: ControlOut<'_, '_, '_, B>)
[src]
pub fn get_bos_descriptors(
&self,
writer: &mut BosWriter<'_, '_>
) -> Result<(), UsbError>
[src]
&self,
writer: &mut BosWriter<'_, '_>
) -> Result<(), UsbError>
pub fn poll(&mut self)
[src]
pub fn endpoint_setup(&mut self, addr: EndpointAddress)
[src]
Auto Trait Implementations
impl<'a, B> Send for TestClass<'a, B>
[src]
impl<'a, B> Sync for TestClass<'a, B>
[src]
impl<'a, B> Unpin for TestClass<'a, B>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,