pub fn create_descriptor_buffers(
device_descriptor: DeviceDescriptor,
configuration_descriptor: ConfigurationDescriptor,
interface_descriptor: &mut [InterfaceDescriptor],
endpoint_descriptors: &[&[EndpointDescriptor]],
hid_descriptor: Option<&HIDDescriptor<'_>>,
cdc_descriptor: Option<&[CdcInterfaceDescriptor]>,
) -> (DeviceBuffer, DescriptorBuffer)
Expand description
Transform descriptor structs into descriptor buffers that can be passed into the control endpoint handler.
Each endpoint descriptor list corresponds to the matching index in
the interface descriptor list. For example, if the interface
descriptor list contains [ID1, ID2, ID3]
, and the endpoint
descriptors list is [[ED1, ED2], [ED3, ED4, ED5], [ED6]]
, then
the third interface descriptor (ID3
) has one corresponding
endpoint descriptor (ED6
).