usbstack: Revise usb string descriptor table to use enum values for indices

This makes it possible for macros of conditionally included string
descriptors to get a correct index no matter what other usb drivers
are enabled or disabled due to the nature behavior of enums.

Change-Id: I8ccebbd316605bed0f5d90b6b73fab4a333c02fa
This commit is contained in:
James Buren 2021-10-06 16:40:54 -05:00 committed by Aidan MacDonald
parent 4be81c2385
commit c0a59b9a6a
2 changed files with 17 additions and 10 deletions

View file

@ -39,6 +39,14 @@
extern int usb_max_pkt_size;
enum {
USB_STRING_INDEX_LANGUAGE,
USB_STRING_INDEX_MANUFACTURER,
USB_STRING_INDEX_PRODUCT,
USB_STRING_INDEX_SERIAL,
USB_STRING_INDEX_MAX,
};
struct usb_class_driver;
void usb_core_init(void);