diff options
author | David Madison <dmadison@users.noreply.github.com> | 2020-02-01 04:25:52 -0500 |
---|---|---|
committer | David Madison <dmadison@users.noreply.github.com> | 2020-02-01 04:25:52 -0500 |
commit | 923b4441fed740c5ff1e42bb8f2f58ea87d4eaf7 (patch) | |
tree | 39aad14af9ba55cc9f26f2920f6ff873552f4c62 /cores/arduino/USBCore.h | |
parent | 59dd6085ec8ec0a5438c1019e982fefb77f485d3 (diff) | |
parent | 0e7fae85bdfbab43242374c0289cdd806d13b0bc (diff) |
Merge ArduinoCore-avr Release 1.8.2
Diffstat (limited to 'cores/arduino/USBCore.h')
-rw-r--r-- | cores/arduino/USBCore.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cores/arduino/USBCore.h b/cores/arduino/USBCore.h index eafdbe5..578e1b8 100644 --- a/cores/arduino/USBCore.h +++ b/cores/arduino/USBCore.h @@ -87,6 +87,9 @@ // bMaxPower in Configuration Descriptor #define USB_CONFIG_POWER_MA(mA) ((mA)/2) +#ifndef USB_CONFIG_POWER + #define USB_CONFIG_POWER (500) +#endif // bEndpointAddress in Endpoint Descriptor #define USB_ENDPOINT_DIRECTION_MASK 0x80 @@ -166,7 +169,7 @@ typedef struct { 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) } + { 9, 2, _totalLength,_interfaces, 1, 0, USB_CONFIG_BUS_POWERED | USB_CONFIG_REMOTE_WAKEUP, USB_CONFIG_POWER_MA(USB_CONFIG_POWER) } #define D_INTERFACE(_n,_numEndpoints,_class,_subClass,_protocol) \ { 9, 4, _n, 0, _numEndpoints, _class,_subClass, _protocol, 0 } |