summaryrefslogtreecommitdiff
path: root/at91lib/usb/device
diff options
context:
space:
mode:
Diffstat (limited to 'at91lib/usb/device')
-rw-r--r--at91lib/usb/device/ccid/cciddriver.c4
-rw-r--r--at91lib/usb/device/dfu/dfu.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/at91lib/usb/device/ccid/cciddriver.c b/at91lib/usb/device/ccid/cciddriver.c
index 495a897..989345e 100644
--- a/at91lib/usb/device/ccid/cciddriver.c
+++ b/at91lib/usb/device/ccid/cciddriver.c
@@ -90,9 +90,7 @@ typedef struct {
USBEndpointDescriptor bulkIn;
/// Interrupt OUT endpoint descriptor
USBEndpointDescriptor interruptIn;
-#ifdef BOARD_USB_DFU
- USBInterfaceDescriptor dfu_interface[DFU_NUM_IF];
-#endif
+ DFU_IF_DESCRIPTORS_STRUCT
} __attribute__ ((packed)) CCIDDriverConfigurationDescriptors;
//------------------------------------------------------------------------------
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