summaryrefslogtreecommitdiff
path: root/at91lib/usb/device/dfu/dfu.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-07-31 16:22:45 +0200
committerHarald Welte <laforge@gnumonks.org>2011-07-31 16:26:38 +0200
commit6445a4cdb0b6a6d701d631d81791c72df1771bd6 (patch)
tree7b302cbdee0f35741bd6b702331c870570ad9bf1 /at91lib/usb/device/dfu/dfu.h
parent5d5479fd3a0d0d4c1890f606ea4fcec899099eb6 (diff)
DFU: remove need for "#ifdef BOARD_USB_DFU" in drivers
We define a DFU_IF_DESCRIPTORS_STRUCT macro that adds the respective structure members to the 'struct CCIDDriverConfigurationDescriptors' (or similar in other drivers)
Diffstat (limited to 'at91lib/usb/device/dfu/dfu.h')
-rw-r--r--at91lib/usb/device/dfu/dfu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/at91lib/usb/device/dfu/dfu.h b/at91lib/usb/device/dfu/dfu.h
index f1323c1..3b7a41a 100644
--- a/at91lib/usb/device/dfu/dfu.h
+++ b/at91lib/usb/device/dfu/dfu.h
@@ -15,6 +15,10 @@ struct USBStringDescriptor {
#ifdef BOARD_USB_DFU
#define DFU_NUM_IF 3
+
+#define DFU_IF_DESCRIPTORS_STRUCT \
+ USBInterfaceDescriptor dfu_interface[DFU_NUM_IF];
+
#define DFU_IF_DESCRIPTORS { \
{ \
.bLength = sizeof(USBInterfaceDescriptor), \
@@ -65,6 +69,7 @@ extern const struct USBStringDescriptor USBDFU_string3;
/* no DFU bootloader is being used */
#define DFU_NUM_IF 0
+#define DFU_IF_DESCRIPTORS_STRUCT
#define DFU_IF_DESCRIPTORS
#define DFU_NUM_STRINGS 0
personal git repositories of Harald Welte. Your mileage may vary