From cabae13e55b8e6de88a3aee452a66a1e2a8c352b Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 30 Sep 2015 20:52:00 +0200 Subject: [PUSB] Fixed the correct number of endpoints --- cores/arduino/PluggableUSB.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cores/arduino/PluggableUSB.cpp') 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; } -- cgit v1.2.3-18-g5258