removed conditional compilation checks for CDC_ENABLED

bootloader must always have CDC enabled
This commit is contained in:
Zach Eveland 2011-10-27 10:48:26 -04:00
parent 9dc9e60704
commit 040a469f79
4 changed files with 1 additions and 28 deletions

View File

@ -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) */
#endif /* if defined(USBCON) */

View File

@ -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

View File

@ -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;
}

View File

@ -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