Skip to content

Commit

Permalink
Stop hardcoding WinUSB descriptor string lengths
Browse files Browse the repository at this point in the history
Done to reduce risk of the descriptor lengths getting out of sync.
  • Loading branch information
forderud committed Oct 2, 2024
1 parent 7d7fb67 commit be3b867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions teensy4/usb_desc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2821,8 +2821,8 @@ const usb_descriptor_list_t usb_descriptor_list[] = {
{0x0304, 0x0409, (const uint8_t *)&usb_string_mtp, 0},
#endif
#ifdef EXPERIMENTAL_INTERFACE
{0x03EE, 0x0000, microsoft_os_string_desc, 18},
{0x0000, 0xEE04, microsoft_os_compatible_id_desc, 40},
{0x03EE, 0x0000, microsoft_os_string_desc, sizeof(microsoft_os_string_desc)},
{0x0000, 0xEE04, microsoft_os_compatible_id_desc, sizeof(microsoft_os_compatible_id_desc)},
#endif
{0x0300, 0x0000, (const uint8_t *)&string0, 0},
{0x0301, 0x0409, (const uint8_t *)&usb_string_manufacturer_name, 0},
Expand Down

0 comments on commit be3b867

Please sign in to comment.