aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino
diff options
context:
space:
mode:
authorMartino Facchin <m.facchin@arduino.cc>2016-07-22 10:08:04 +0200
committerGitHub <noreply@github.com>2016-07-22 10:08:04 +0200
commit9a4f49b20eb6325abc81b9502e82d92f384ee4ac (patch)
treeaf5cf0c0b87dab8481eb8e30d1786f30a406551c /cores/arduino
parenta03982445a085821bbf8893c0b7f626e440433ad (diff)
parentc20e2710506f3c66325141a1680510545ea907f6 (diff)
Merge pull request #5128 from facchinm/configurable_usb210
[AVR][USB] Configurable USB_VERSION value via define
Diffstat (limited to 'cores/arduino')
-rw-r--r--cores/arduino/USBCore.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/cores/arduino/USBCore.h b/cores/arduino/USBCore.h
index 66f3b5b..18560b6 100644
--- a/cores/arduino/USBCore.h
+++ b/cores/arduino/USBCore.h
@@ -126,11 +126,15 @@
#define MSC_SUBCLASS_SCSI 0x06
#define MSC_PROTOCOL_BULK_ONLY 0x50
+#ifndef USB_VERSION
+#define USB_VERSION 0x200
+#endif
+
// Device
typedef struct {
u8 len; // 18
u8 dtype; // 1 USB_DEVICE_DESCRIPTOR_TYPE
- u16 usbVersion; // 0x200
+ u16 usbVersion; // 0x200 or 0x210
u8 deviceClass;
u8 deviceSubClass;
u8 deviceProtocol;
@@ -260,7 +264,7 @@ typedef struct
#define D_DEVICE(_class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs) \
- { 18, 1, 0x200, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
+ { 18, 1, USB_VERSION, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
#define D_CONFIG(_totalLength,_interfaces) \
{ 9, 2, _totalLength,_interfaces, 1, 0, USB_CONFIG_BUS_POWERED | USB_CONFIG_REMOTE_WAKEUP, USB_CONFIG_POWER_MA(500) }