summaryrefslogtreecommitdiffstats
path: root/firmware/usbstack/usb_class_driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usbstack/usb_class_driver.h')
-rw-r--r--firmware/usbstack/usb_class_driver.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/usbstack/usb_class_driver.h b/firmware/usbstack/usb_class_driver.h
index 22b1c6888c..b51eb3e93f 100644
--- a/firmware/usbstack/usb_class_driver.h
+++ b/firmware/usbstack/usb_class_driver.h
@@ -85,4 +85,10 @@ struct usb_class_driver {
#endif
};
+#define PACK_DESCRIPTOR(dest, descriptor) \
+ do { \
+ memcpy(dest, &(descriptor), sizeof(descriptor)); \
+ dest += sizeof(descriptor); \
+ } while (0)
+
#endif