usb: Allow registration of a single non-contiguous string descriptor for WinUSB

Classic WinUSB support is detected by probing for a string descriptor
at index 0xEE with a special string.
usbd_register_extra_string() allows registration of a string at this
index without having to provide 237 other string descriptors

Originally filed as https://github.com/libopencm3/libopencm3/pull/849

WCID reference: https://github.com/pbatard/libwdi/wiki/WCID-Devices
This commit is contained in:
Devan Lai
2020-10-17 17:12:20 +00:00
committed by Karl Palsson
parent ffe8ddfca2
commit c13c2b3b3c
4 changed files with 38 additions and 1 deletions

View File

@@ -92,6 +92,10 @@ struct _usbd_device {
const struct _usbd_driver *driver;
/* Extra, non-contiguous user string descriptor index and value */
int extra_string_idx;
const char* extra_string;
/* private driver data */
uint16_t fifo_mem_top;