diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2012-01-10 15:31:56 -0500 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2012-01-10 15:31:56 -0500 |
commit | 648dd85e945a7e0a2db284987377a97936ee77e4 (patch) | |
tree | c29170421d6ff84020d679accbdad86ece4eaa89 /bootloaders/diskloader/src/USBDesc.h | |
parent | 59ef51d752db28757184565c452640d323440480 (diff) |
added conditional compilation for HID, removed conditional compilation for CDC (is always used). disabled HID by default. also always enumerates as composite now.
the bootloader must always have a CDC interface. HID is optional and not even complete to reduce size.
Diffstat (limited to 'bootloaders/diskloader/src/USBDesc.h')
-rw-r--r-- | bootloaders/diskloader/src/USBDesc.h | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/bootloaders/diskloader/src/USBDesc.h b/bootloaders/diskloader/src/USBDesc.h index a970fa4..3a7fc55 100644 --- a/bootloaders/diskloader/src/USBDesc.h +++ b/bootloaders/diskloader/src/USBDesc.h @@ -16,36 +16,31 @@ ** SOFTWARE. */ - -#ifdef CDC_ENABLED - -#define CDC_ACM_INTERFACE 0 // CDC ACM -#define CDC_DATA_INTERFACE 1 // CDC Data -#define CDC_ENDPOINT_ACM 1 -#define CDC_ENDPOINT_OUT 2 -#define CDC_ENDPOINT_IN 3 - -#define HID_INTERFACE 2 // HID Interface -#define HID_ENDPOINT_INT 4 - -#define INTERFACE_COUNT 3 // 2 for cdc + 1 for hid - -#else - -#define HID_INTERFACE 2 // HID Interface -#define HID_ENDPOINT_INT 4 - -#define INTERFACE_COUNT 1 // 1 for hid - -#endif +#ifndef HID_ENABLED // HID is NOT enabled + #define CDC_ACM_INTERFACE 0 // CDC ACM + #define CDC_DATA_INTERFACE 1 // CDC Data + #define CDC_ENDPOINT_ACM 1 + #define CDC_ENDPOINT_OUT 2 + #define CDC_ENDPOINT_IN 3 + #define INTERFACE_COUNT 2 // 2 for CDC +#else // HID is enabled + #define CDC_ACM_INTERFACE 0 // CDC ACM + #define CDC_DATA_INTERFACE 1 // CDC Data + #define CDC_ENDPOINT_ACM 1 + #define CDC_ENDPOINT_OUT 2 + #define CDC_ENDPOINT_IN 3 + #define HID_INTERFACE 2 // HID Interface + #define HID_ENDPOINT_INT 4 + #define INTERFACE_COUNT 3 // 2 for CDC + 1 for hid +#endif typedef struct { ConfigDescriptor config; -#ifdef CDC_ENABLED CDCDescriptor cdc; -#endif +#ifdef HID_ENABLED HIDDescriptor hid; +#endif } Config; extern Config USB_ConfigDescriptor PROGMEM; |