pub struct DescriptorWriter<'a> { /* fields omitted */ }A writer for USB descriptors.
Gets the current position in the buffer, i.e. the number of bytes written so far.
pub fn write(&mut self, descriptor_type: u8, descriptor: &[u8]) -> Result<()> | [src] |
Writes an arbitrary (usually class-specific) descriptor.
Writes a interface descriptor.
number - Interface number previously allocated with
UsbBusAllocator::interface.
interface_class - Class code assigned by USB.org. Use 0xff for vendor-specific devices
that do not conform to any class.
interface_sub_class - Sub-class code. Depends on class.
interface_protocol - Protocol code. Depends on class and sub-class.
Writes an endpoint descriptor.
🔬 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