Skip to content

Commit 65d17fc

Browse files
facchinmcmaglie
authored andcommitted
fix HID descriptors bigger than 127 bytes
1 parent 7482fe1 commit 65d17fc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

hardware/arduino/avr/cores/arduino/PluggableUSB.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ static u8 modules_count = 0;
3636
static PUSBListNode* rootNode = NULL;
3737
static PUSBListNode* lastNode = NULL;
3838

39-
int8_t PUSB_GetInterface(u8* interfaceNum)
39+
int PUSB_GetInterface(u8* interfaceNum)
4040
{
41-
int8_t ret = 0;
41+
int ret = 0;
4242
PUSBListNode* node = rootNode;
4343
for (u8 i=0; i<modules_count; i++) {
4444
ret = node->cb->getInterface(interfaceNum);
@@ -47,9 +47,9 @@ int8_t PUSB_GetInterface(u8* interfaceNum)
4747
return ret;
4848
}
4949

50-
int8_t PUSB_GetDescriptor(int8_t t)
50+
int PUSB_GetDescriptor(int8_t t)
5151
{
52-
int8_t ret = 0;
52+
int ret = 0;
5353
PUSBListNode* node = rootNode;
5454
for (u8 i=0; i<modules_count && ret == 0; i++) {
5555
ret = node->cb->getDescriptor(t);

hardware/arduino/avr/cores/arduino/PluggableUSB.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
typedef struct
2929
{
3030
bool (*setup)(Setup& setup, u8 i);
31-
int8_t (*getInterface)(u8* interfaceNum);
32-
int8_t (*getDescriptor)(int8_t t);
31+
int (*getInterface)(u8* interfaceNum);
32+
int (*getDescriptor)(int8_t t);
3333
int8_t numEndpoints;
3434
int8_t numInterfaces;
3535
uint8_t *endpointType;
@@ -50,9 +50,9 @@ class PUSBListNode {
5050

5151
int8_t PUSB_AddFunction(PUSBListNode *node, u8 *interface);
5252

53-
int8_t PUSB_GetInterface(u8* interfaceNum);
53+
int PUSB_GetInterface(u8* interfaceNum);
5454

55-
int8_t PUSB_GetDescriptor(int8_t t);
55+
int PUSB_GetDescriptor(int8_t t);
5656

5757
bool PUSB_Setup(Setup& setup, u8 i);
5858

0 commit comments

Comments
 (0)