diff options
author | Cristian Maglie <c.maglie@arduino.cc> | 2015-09-30 20:52:00 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2015-10-02 11:59:23 +0200 |
commit | cabae13e55b8e6de88a3aee452a66a1e2a8c352b (patch) | |
tree | dd5bd4c74d1fe64b3ba1d5412c1d3edb2eba823e /cores/arduino/PluggableUSB.cpp | |
parent | e42d7d6221e175e087196f946ae139ca236f4e46 (diff) |
[PUSB] Fixed the correct number of endpoints
Diffstat (limited to 'cores/arduino/PluggableUSB.cpp')
-rw-r--r-- | cores/arduino/PluggableUSB.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cores/arduino/PluggableUSB.cpp b/cores/arduino/PluggableUSB.cpp index 5a53eb1..50fd798 100644 --- a/cores/arduino/PluggableUSB.cpp +++ b/cores/arduino/PluggableUSB.cpp @@ -23,9 +23,6 @@ #if defined(USBCON) #ifdef PLUGGABLE_USB_ENABLED -// TODO: set correct value for different CPUs -#define MAX_EP 6 - extern uint8_t _initEndpoints[]; PluggableUSB_ PluggableUSB; @@ -64,7 +61,7 @@ bool PluggableUSB_::setup(USBSetup& setup, uint8_t j) bool PluggableUSB_::plug(PUSBListNode *node) { - if ((lastEp + node->numEndpoints) >= MAX_EP) { + if ((lastEp + node->numEndpoints) > USB_ENDPOINTS) { return false; } |