From 648dd85e945a7e0a2db284987377a97936ee77e4 Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Tue, 10 Jan 2012 15:31:56 -0500 Subject: 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. --- bootloaders/diskloader/src/USBCore.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bootloaders/diskloader/src/USBCore.cpp') 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) { -- cgit v1.2.3-18-g5258