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/USBCore.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'cores/arduino/USBCore.cpp') diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp index f96ff27..ebdce36 100644 --- a/cores/arduino/USBCore.cpp +++ b/cores/arduino/USBCore.cpp @@ -308,20 +308,15 @@ int USB_Send(u8 ep, const void* d, int len) return r; } -u8 _initEndpoints[] = +u8 _initEndpoints[USB_ENDPOINTS] = { - 0, + 0, // Control Endpoint - EP_TYPE_INTERRUPT_IN, // CDC_ENDPOINT_ACM - EP_TYPE_BULK_OUT, // CDC_ENDPOINT_OUT - EP_TYPE_BULK_IN, // CDC_ENDPOINT_IN + EP_TYPE_INTERRUPT_IN, // CDC_ENDPOINT_ACM + EP_TYPE_BULK_OUT, // CDC_ENDPOINT_OUT + EP_TYPE_BULK_IN, // CDC_ENDPOINT_IN -#ifdef PLUGGABLE_USB_ENABLED - //allocate 3 endpoints and remove const so they can be changed by the user - 0, - 0, - 0, -#endif + // Following endpoints are automatically initialized to 0 }; #define EP_SINGLE_64 0x32 // EP0 -- cgit v1.2.3-18-g5258