summaryrefslogtreecommitdiffstats
path: root/firmware/export
diff options
context:
space:
mode:
authorJames Buren <braewoods+rb@braewoods.net>2021-10-06 16:40:54 -0500
committerAidan MacDonald <amachronic@protonmail.com>2021-10-06 17:59:17 -0400
commitc0a59b9a6a132425136f807787e22d78547f81b5 (patch)
tree3233f52a7fc54e1a88fb91c1a253c4fff1c7a9d9 /firmware/export
parent4be81c23858ad59d25041c20159f1ef3970eb757 (diff)
downloadrockbox-c0a59b9a6a.tar.gz
rockbox-c0a59b9a6a.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')
-rw-r--r--firmware/export/usb_core.h8
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 @@
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);