Skip to content

Commit 59b0f43

Browse files
committed
fix pluggableUSB OUT packets
1 parent 4af7743 commit 59b0f43

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

cores/arduino/USB/PluggableUSB.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ typedef struct __attribute__((packed))
3232
int (*getDescriptor)(int8_t t);
3333
int8_t numEndpoints;
3434
int8_t numInterfaces;
35-
uint8_t *endpointType;
35+
uint32_t *endpointType;
3636
} PUSBCallbacks;
3737

3838
typedef struct

cores/arduino/USB/USBAPI.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ class USBDeviceClass {
7272

7373
// Control EndPoint API
7474
uint32_t sendControl(const void *data, uint32_t len);
75+
uint32_t sendControl(int ignored, const void *data, uint32_t len) {
76+
return sendControl(data,len);
77+
}
7578
uint32_t recvControl(void *data, uint32_t len);
7679
uint32_t sendConfiguration(uint32_t maxlen);
7780
bool sendStringDescriptor(const uint8_t *string, uint8_t maxlen);

cores/arduino/USB/USBCore.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ volatile uint32_t _usbConfiguration = 0;
7575
volatile uint32_t _usbSetInterface = 0;
7676

7777
static __attribute__((__aligned__(4))) //__attribute__((__section__(".bss_hram0")))
78-
uint8_t udd_ep_out_cache_buffer[4][64];
78+
uint8_t udd_ep_out_cache_buffer[6][64];
7979

8080
static __attribute__((__aligned__(4))) //__attribute__((__section__(".bss_hram0")))
81-
uint8_t udd_ep_in_cache_buffer[4][64];
81+
uint8_t udd_ep_in_cache_buffer[6][64];
8282

8383
//==================================================================
8484

cores/arduino/cortex_handlers.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ void RTC_Handler (void) __attribute__ ((weak, alias("Dummy_Handler")));
5050
void EIC_Handler (void) __attribute__ ((weak, alias("Dummy_Handler")));
5151
void NVMCTRL_Handler (void) __attribute__ ((weak, alias("Dummy_Handler")));
5252
void DMAC_Handler (void) __attribute__ ((weak, alias("Dummy_Handler")));
53-
void USB_Handler (void) __attribute__ ((weak, alias("Dummy_Handler")));
5453
void EVSYS_Handler (void) __attribute__ ((weak, alias("Dummy_Handler")));
5554
void SERCOM0_Handler (void) __attribute__ ((weak, alias("Dummy_Handler")));
5655
void SERCOM1_Handler (void) __attribute__ ((weak, alias("Dummy_Handler")));
@@ -177,7 +176,7 @@ void SysTick_Handler(void)
177176
SysTick_DefaultHandler();
178177
}
179178

180-
static void (*usb_isr)(void) = NULL;
179+
static void (*usb_isr)(void);
181180

182181
void USB_Handler(void)
183182
{

libraries/HID/HID.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ bool HID_Setup(USBSetup& setup, uint8_t i)
152152

153153
HID_::HID_(void)
154154
{
155-
static uint8_t endpointType[1];
155+
static uint32_t endpointType[1];
156156

157157
endpointType[0] = USB_ENDPOINT_TYPE_BULK | USB_ENDPOINT_IN(0);
158158

0 commit comments

Comments
 (0)