summaryrefslogtreecommitdiffstats
path: root/utils/hwstub/stub/usb_drv.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/hwstub/stub/usb_drv.h')
-rw-r--r--utils/hwstub/stub/usb_drv.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/hwstub/stub/usb_drv.h b/utils/hwstub/stub/usb_drv.h
index 00f22d8e1a..ef032f52a3 100644
--- a/utils/hwstub/stub/usb_drv.h
+++ b/utils/hwstub/stub/usb_drv.h
@@ -43,5 +43,12 @@ void usb_drv_set_address(int address);
int usb_drv_port_speed(void);
void usb_drv_configure_endpoint(int ep_num, int type);
+/* USB_STRING_INITIALIZER(u"Example String") */
+#define USB_STRING_INITIALIZER(S) { \
+ sizeof(struct usb_string_descriptor) + sizeof(S) - sizeof(*S), \
+ USB_DT_STRING, \
+ S \
+}
+
#endif /* _USB_DRV_H */