aboutsummaryrefslogtreecommitdiff
path: root/bootloaders/diskloader/src/USBDesc.cpp
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2012-01-10 15:31:56 -0500
committerZach Eveland <zeveland@blacklabel-development.com>2012-01-10 15:31:56 -0500
commit648dd85e945a7e0a2db284987377a97936ee77e4 (patch)
treec29170421d6ff84020d679accbdad86ece4eaa89 /bootloaders/diskloader/src/USBDesc.cpp
parent59ef51d752db28757184565c452640d323440480 (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.cpp')
-rw-r--r--bootloaders/diskloader/src/USBDesc.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/bootloaders/diskloader/src/USBDesc.cpp b/bootloaders/diskloader/src/USBDesc.cpp
index ade072a..b143687 100644
--- a/bootloaders/diskloader/src/USBDesc.cpp
+++ b/bootloaders/diskloader/src/USBDesc.cpp
@@ -47,18 +47,12 @@ const u16 STRING_IMANUFACTURER[12] = {
};
-//#ifdef CDC_ENABLED
-DeviceDescriptor USB_DeviceDescriptorA = D_DEVICE(0X02,0X00,0X00,64,USB_VID,USB_PID,0x100,0,IPRODUCT,ISERIAL,1);
-//#else
-DeviceDescriptor USB_DeviceDescriptor = D_DEVICE(0x00,0x00,0x00,64,USB_VID,USB_PID,0x100,0,IPRODUCT,ISERIAL,1);
-//#endif
-
+DeviceDescriptor USB_DeviceDescriptor = D_DEVICE(0X02,0X00,0X00,64,USB_VID,USB_PID,0x100,0,IPRODUCT,ISERIAL,1);
Config USB_ConfigDescriptor =
{
D_CONFIG(sizeof(Config),INTERFACE_COUNT),
-#ifdef CDC_ENABLED
// CDC
{
D_IAD(0,2,CDC_COMMUNICATION_INTERFACE_CLASS,CDC_ABSTRACT_CONTROL_MODEL,1),
@@ -76,12 +70,14 @@ Config USB_ConfigDescriptor =
D_ENDPOINT(USB_ENDPOINT_OUT(CDC_ENDPOINT_OUT),USB_ENDPOINT_TYPE_BULK,0x40,0),
D_ENDPOINT(USB_ENDPOINT_IN (CDC_ENDPOINT_IN ),USB_ENDPOINT_TYPE_BULK,0x40,0)
},
-#endif
+
+#ifdef HID_ENABLED
// HID
{
D_INTERFACE(HID_INTERFACE,1,3,0,0),
D_HIDREPORT(30),
D_ENDPOINT(USB_ENDPOINT_IN (HID_ENDPOINT_INT),USB_ENDPOINT_TYPE_INTERRUPT,0x40,0x40)
}
+#endif
};