From 30ebf7f92483bb57076ba571dcd04b4e8bb94872 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Fri, 26 Jun 2015 17:16:54 +0200 Subject: fix HID descriptors bigger than 127 bytes --- libraries/HID/HID.cpp | 8 ++++---- libraries/HID/HID.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'libraries') diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp index bd7d25c..c1ac51a 100644 --- a/libraries/HID/HID.cpp +++ b/libraries/HID/HID.cpp @@ -51,13 +51,13 @@ HIDDescriptor _hidInterface; u8 _hid_protocol = 1; u8 _hid_idle = 1; -int8_t WEAK HID_GetInterface(u8* interfaceNum) +int HID_GetInterface(u8* interfaceNum) { interfaceNum[0] += 1; // uses 1 return USB_SendControl(0,&_hidInterface,sizeof(_hidInterface)); } -int8_t WEAK HID_GetDescriptor(int8_t t) +int HID_GetDescriptor(int8_t t) { if (HID_REPORT_DESCRIPTOR_TYPE == t) { return USB_SendControl(TRANSFER_PGM,_hidReportDescriptor,getsizeof_hidReportDescriptor()); @@ -66,13 +66,13 @@ int8_t WEAK HID_GetDescriptor(int8_t t) } } -void WEAK HID_SendReport(u8 id, const void* data, int len) +void HID_SendReport(u8 id, const void* data, int len) { USB_Send(HID_TX, &id, 1); USB_Send(HID_TX | TRANSFER_RELEASE,data,len); } -bool WEAK HID_Setup(Setup& setup, u8 i) +bool HID_Setup(Setup& setup, u8 i) { if (HID_INTERFACE != i) { return false; diff --git a/libraries/HID/HID.h b/libraries/HID/HID.h index a75774f..fe8ee09 100644 --- a/libraries/HID/HID.h +++ b/libraries/HID/HID.h @@ -39,8 +39,8 @@ public: }; int8_t HID_Plug(void); -int8_t HID_GetInterface(u8* interfaceNum); -int8_t HID_GetDescriptor(int8_t t); +int HID_GetInterface(u8* interfaceNum); +int HID_GetDescriptor(int8_t t); bool HID_Setup(Setup& setup, u8 i); void HID_SendReport(uint8_t id, const void* data, int len); -- cgit v1.2.3-18-g5258