From a5ad4744b543daeaae0b01e8a1de6603bec954ad Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Fri, 4 Sep 2015 10:03:40 +0200 Subject: [PATCH] fix OUT endpoints was using only lower 8 bits of configuration registers --- hardware/arduino/sam/cores/arduino/USB/PluggableUSB.h | 2 +- hardware/arduino/sam/libraries/HID/HID.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hardware/arduino/sam/cores/arduino/USB/PluggableUSB.h b/hardware/arduino/sam/cores/arduino/USB/PluggableUSB.h index 205900550..502da9ebc 100644 --- a/hardware/arduino/sam/cores/arduino/USB/PluggableUSB.h +++ b/hardware/arduino/sam/cores/arduino/USB/PluggableUSB.h @@ -32,7 +32,7 @@ typedef struct __attribute__((packed)) int (*getDescriptor)(int8_t t); int8_t numEndpoints; int8_t numInterfaces; - uint8_t *endpointType; + uint32_t *endpointType; } PUSBCallbacks; typedef struct diff --git a/hardware/arduino/sam/libraries/HID/HID.cpp b/hardware/arduino/sam/libraries/HID/HID.cpp index d704bc883..935039096 100644 --- a/hardware/arduino/sam/libraries/HID/HID.cpp +++ b/hardware/arduino/sam/libraries/HID/HID.cpp @@ -144,7 +144,7 @@ bool HID_Setup(USBSetup& setup, uint8_t i) HID_::HID_(void) { - static uint8_t endpointType[1]; + static uint32_t endpointType[1]; endpointType[0] = EP_TYPE_INTERRUPT_IN;