From c0a59b9a6a132425136f807787e22d78547f81b5 Mon Sep 17 00:00:00 2001 From: James Buren Date: Wed, 6 Oct 2021 16:40:54 -0500 Subject: 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 --- firmware/export/usb_core.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'firmware/export') diff --git a/firmware/export/usb_core.h b/firmware/export/usb_core.h index 75fafc06a8..78a80435e1 100644 --- a/firmware/export/usb_core.h +++ b/firmware/export/usb_core.h @@ -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); -- cgit