diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-27 10:48:26 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-27 10:48:26 -0400 |
commit | 5d976f8b1d1b5dbf8b0dbe4ec292ffa28409fcf2 (patch) | |
tree | 5540647b3f408068c7fd0d21022770a1ce03a6f3 /bootloaders/diskloader/src | |
parent | 0ab2cb1c698017e4a81ec17d8677de09553e8683 (diff) |
removed conditional compilation checks for CDC_ENABLED
bootloader must always have CDC enabled
Diffstat (limited to 'bootloaders/diskloader/src')
-rw-r--r-- | bootloaders/diskloader/src/CDC.cpp | 5 | ||||
-rw-r--r-- | bootloaders/diskloader/src/Platform.h | 2 | ||||
-rw-r--r-- | bootloaders/diskloader/src/USBCore.cpp | 13 | ||||
-rw-r--r-- | bootloaders/diskloader/src/USBDesc.h | 9 |
4 files changed, 1 insertions, 28 deletions
diff --git a/bootloaders/diskloader/src/CDC.cpp b/bootloaders/diskloader/src/CDC.cpp index a542d3c..4496a9c 100644 --- a/bootloaders/diskloader/src/CDC.cpp +++ b/bootloaders/diskloader/src/CDC.cpp @@ -21,7 +21,6 @@ #include <avr/wdt.h> #if defined(USBCON) -#ifdef CDC_ENABLED typedef struct { @@ -91,6 +90,4 @@ bool WEAK CDC_Setup(Setup& setup) } return false; } - -#endif -#endif /* if defined(USBCON) */
\ No newline at end of file +#endif /* if defined(USBCON) */ diff --git a/bootloaders/diskloader/src/Platform.h b/bootloaders/diskloader/src/Platform.h index 9416c47..f1194a5 100644 --- a/bootloaders/diskloader/src/Platform.h +++ b/bootloaders/diskloader/src/Platform.h @@ -25,8 +25,6 @@ typedef unsigned char u8; typedef unsigned short u16; typedef unsigned long u32; -#define CDC_ENABLED - #define USB_PID_LEONARDO 0x0034 #define USB_PID_MICRO 0x0035 #define USB_VID 0x2341 // arduino LLC vid diff --git a/bootloaders/diskloader/src/USBCore.cpp b/bootloaders/diskloader/src/USBCore.cpp index 4771181..6518ae9 100644 --- a/bootloaders/diskloader/src/USBCore.cpp +++ b/bootloaders/diskloader/src/USBCore.cpp @@ -62,11 +62,7 @@ const u16 STRING_IMANUFACTURER[12] = { 'A','r','d','u','i','n','o',' ','L','L','C' }; -#ifdef CDC_ENABLED #define DEVICE_CLASS 0x02 -#else -#define DEVICE_CLASS 0x00 -#endif // DEVICE DESCRIPTOR const DeviceDescriptor USB_DeviceDescriptor = @@ -320,12 +316,9 @@ extern const u8 _initEndpoints[] PROGMEM; const u8 _initEndpoints[] = { 0, - -#ifdef CDC_ENABLED EP_TYPE_INTERRUPT_IN, // CDC_ENDPOINT_ACM EP_TYPE_BULK_OUT, // CDC_ENDPOINT_OUT EP_TYPE_BULK_IN, // CDC_ENDPOINT_IN -#endif }; #define EP_SINGLE_64 0x32 // EP0 @@ -360,10 +353,8 @@ bool ClassInterfaceRequest(Setup& setup) { u8 i = setup.wIndex; -#ifdef CDC_ENABLED if (CDC_ACM_INTERFACE == i) return CDC_Setup(setup); -#endif return false; } @@ -422,11 +413,7 @@ int SendInterfaces() { int total = 0; u8 interfaces = 0; - -#ifdef CDC_ENABLED total = CDC_GetInterface(&interfaces); -#endif - return interfaces; } diff --git a/bootloaders/diskloader/src/USBDesc.h b/bootloaders/diskloader/src/USBDesc.h index 997ff61..588a40c 100644 --- a/bootloaders/diskloader/src/USBDesc.h +++ b/bootloaders/diskloader/src/USBDesc.h @@ -16,15 +16,8 @@ ** SOFTWARE. */ -#define CDC_ENABLED - -#ifdef CDC_ENABLED #define CDC_INTERFACE_COUNT 2 #define CDC_ENPOINT_COUNT 3 -#else -#define CDC_INTERFACE_COUNT 0 -#define CDC_ENPOINT_COUNT 0 -#endif #define CDC_ACM_INTERFACE 0 // CDC ACM #define CDC_DATA_INTERFACE 1 // CDC Data @@ -33,10 +26,8 @@ #define CDC_ENDPOINT_OUT (CDC_FIRST_ENDPOINT+1) #define CDC_ENDPOINT_IN (CDC_FIRST_ENDPOINT+2) -#ifdef CDC_ENABLED #define CDC_RX CDC_ENDPOINT_OUT #define CDC_TX CDC_ENDPOINT_IN -#endif #define IMANUFACTURER 1 #define IPRODUCT 2 |