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/USBCore.cpp | |
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/USBCore.cpp')
-rw-r--r-- | bootloaders/diskloader/src/USBCore.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bootloaders/diskloader/src/USBCore.cpp b/bootloaders/diskloader/src/USBCore.cpp index a234596..64f5852 100644 --- a/bootloaders/diskloader/src/USBCore.cpp +++ b/bootloaders/diskloader/src/USBCore.cpp @@ -255,13 +255,13 @@ 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 +#ifdef HID_ENABLED EP_TYPE_INTERRUPT_IN, // HID_ENDPOINT_INT +#endif }; static void InitEndpoints() @@ -357,13 +357,13 @@ bool SendDescriptor() u8 t = setup.wValueH; if (0x22 == t) { +#ifdef HID_ENABLED desc_addr = _rawHID; desc_length = sizeof(desc_length); +#endif } else if (USB_DEVICE_DESCRIPTOR_TYPE == t) { - if (setup.wLength == 8) - _cdcComposite = 1; - desc_addr = _cdcComposite ? (const u8*)&USB_DeviceDescriptorA : (const u8*)&USB_DeviceDescriptor; + desc_addr = (const u8*)&USB_DeviceDescriptor; } else if (USB_CONFIGURATION_DESCRIPTOR_TYPE == t) { |