diff options
author | James Buren <braewoods+rb@braewoods.net> | 2021-10-06 16:40:54 -0500 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-10-06 17:59:17 -0400 |
commit | c0a59b9a6a132425136f807787e22d78547f81b5 (patch) | |
tree | 3233f52a7fc54e1a88fb91c1a253c4fff1c7a9d9 /firmware/export/usb_core.h | |
parent | 4be81c23858ad59d25041c20159f1ef3970eb757 (diff) | |
download | rockbox-c0a59b9a6a132425136f807787e22d78547f81b5.tar.gz rockbox-c0a59b9a6a132425136f807787e22d78547f81b5.zip |
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
Diffstat (limited to 'firmware/export/usb_core.h')
-rw-r--r-- | firmware/export/usb_core.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ | |||
39 | 39 | ||
40 | extern int usb_max_pkt_size; | 40 | extern int usb_max_pkt_size; |
41 | 41 | ||
42 | enum { | ||
43 | USB_STRING_INDEX_LANGUAGE, | ||
44 | USB_STRING_INDEX_MANUFACTURER, | ||
45 | USB_STRING_INDEX_PRODUCT, | ||
46 | USB_STRING_INDEX_SERIAL, | ||
47 | USB_STRING_INDEX_MAX, | ||
48 | }; | ||
49 | |||
42 | struct usb_class_driver; | 50 | struct usb_class_driver; |
43 | 51 | ||
44 | void usb_core_init(void); | 52 | void usb_core_init(void); |