aboutsummaryrefslogtreecommitdiff
path: root/libraries/HID/HID.cpp
diff options
context:
space:
mode:
authorMartino Facchin <m.facchin@arduino.cc>2015-08-13 09:39:21 +0200
committerMartino Facchin <m.facchin@arduino.cc>2015-08-13 09:39:21 +0200
commitb3197c6ef83253d712f4b7b30a0763f18f6d3ddc (patch)
treec1c11380a35613e3ab8e9264bfb84251a91d5db8 /libraries/HID/HID.cpp
parent98f7ab15884119b1c9f1f58f96a8302200c1e2a3 (diff)
parent98301ba23a1f7c60b4590330da2ee1c260da7aa6 (diff)
Merge pull request #3640 from NicoHood/USB-Core-Fixes
Usb core fixes
Diffstat (limited to 'libraries/HID/HID.cpp')
-rw-r--r--libraries/HID/HID.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp
index 0d2133e..c629eb9 100644
--- a/libraries/HID/HID.cpp
+++ b/libraries/HID/HID.cpp
@@ -43,7 +43,7 @@ static u8 HID_INTERFACE;
HIDDescriptor _hidInterface;
static HIDDescriptorListNode* rootNode = NULL;
-static uint8_t sizeof_hidReportDescriptor = 0;
+static uint16_t sizeof_hidReportDescriptor = 0;
static uint8_t modules_count = 0;
//================================================================================
//================================================================================
@@ -59,7 +59,7 @@ int HID_GetInterface(u8* interfaceNum)
{
D_INTERFACE(HID_INTERFACE,1,3,0,0),
D_HIDREPORT(sizeof_hidReportDescriptor),
- D_ENDPOINT(USB_ENDPOINT_IN (HID_ENDPOINT_INT),USB_ENDPOINT_TYPE_INTERRUPT,0x40,0x01)
+ D_ENDPOINT(USB_ENDPOINT_IN (HID_ENDPOINT_INT),USB_ENDPOINT_TYPE_INTERRUPT,USB_EP_SIZE,0x01)
};
return USB_SendControl(0,&_hidInterface,sizeof(_hidInterface));
}
@@ -91,7 +91,7 @@ void HID_::AppendDescriptor(HIDDescriptorListNode *node)
current->next = node;
}
modules_count++;
- sizeof_hidReportDescriptor += node->cb->length;
+ sizeof_hidReportDescriptor += (uint16_t)node->cb->length;
}
void HID_::SendReport(u8 id, const void* data, int len)