Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/arduino/Arduino.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliu nick <flying5yue@sina.com>2016-10-16 06:23:23 +0300
committerCristian Maglie <c.maglie@bug.st>2017-03-16 20:38:01 +0300
commit40e7b1db39009123f019ecc0d3f4605bbc4a9158 (patch)
tree9a2d8afecbe68a2b7e77ce0a741f9fa737615f82 /hardware
parent3c0f26d6a89e249a16eb469774add5aa4487bb3f (diff)
use IAD Descriptor for device descriptor per the definition in "USB 2.0 ECN Interface Association Descriptor" and "USB Interface Association Descriptor Device Class Code and Use Model"
Diffstat (limited to 'hardware')
-rw-r--r--hardware/arduino/avr/cores/arduino/USBCore.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/hardware/arduino/avr/cores/arduino/USBCore.cpp b/hardware/arduino/avr/cores/arduino/USBCore.cpp
index e85c6131b..5a4a08396 100644
--- a/hardware/arduino/avr/cores/arduino/USBCore.cpp
+++ b/hardware/arduino/avr/cores/arduino/USBCore.cpp
@@ -34,8 +34,7 @@ volatile u8 RxLEDPulse; /**< Milliseconds remaining for data Rx LED pulse */
extern const u16 STRING_LANGUAGE[] PROGMEM;
extern const u8 STRING_PRODUCT[] PROGMEM;
extern const u8 STRING_MANUFACTURER[] PROGMEM;
-extern const DeviceDescriptor USB_DeviceDescriptor PROGMEM;
-extern const DeviceDescriptor USB_DeviceDescriptorB PROGMEM;
+extern const DeviceDescriptor USB_DeviceDescriptorIAD PROGMEM;
extern bool _updatedLUFAbootloader;
const u16 STRING_LANGUAGE[2] = {
@@ -71,10 +70,7 @@ const u8 STRING_MANUFACTURER[] PROGMEM = USB_MANUFACTURER;
#define DEVICE_CLASS 0x02
// DEVICE DESCRIPTOR
-const DeviceDescriptor USB_DeviceDescriptor =
- D_DEVICE(0x00,0x00,0x00,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,ISERIAL,1);
-
-const DeviceDescriptor USB_DeviceDescriptorB =
+const DeviceDescriptor USB_DeviceDescriptorIAD =
D_DEVICE(0xEF,0x02,0x01,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,ISERIAL,1);
//==================================================================
@@ -519,9 +515,7 @@ bool SendDescriptor(USBSetup& setup)
const u8* desc_addr = 0;
if (USB_DEVICE_DESCRIPTOR_TYPE == t)
{
- if (setup.wLength == 8)
- _cdcComposite = 1;
- desc_addr = _cdcComposite ? (const u8*)&USB_DeviceDescriptorB : (const u8*)&USB_DeviceDescriptor;
+ desc_addr = (const u8*)&USB_DeviceDescriptorIAD;
}
else if (USB_STRING_DESCRIPTOR_TYPE == t)
{