diff options
Diffstat (limited to 'cores/arduino/HID.cpp')
-rw-r--r-- | cores/arduino/HID.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/cores/arduino/HID.cpp b/cores/arduino/HID.cpp index ac63608..75c37b2 100644 --- a/cores/arduino/HID.cpp +++ b/cores/arduino/HID.cpp @@ -16,9 +16,7 @@ ** SOFTWARE. */ -#include "Platform.h" #include "USBAPI.h" -#include "USBDesc.h" #if defined(USBCON) #ifdef HID_ENABLED @@ -106,7 +104,7 @@ const u8 _hidReportDescriptor[] = { 0x81, 0x00, // INPUT (Data,Ary,Abs) 0xc0, // END_COLLECTION -#if RAWHID_ENABLED +#ifdef RAWHID_ENABLED // RAW HID 0x06, LSB(RAWHID_USAGE_PAGE), MSB(RAWHID_USAGE_PAGE), // 30 0x0A, LSB(RAWHID_USAGE), MSB(RAWHID_USAGE), @@ -151,7 +149,7 @@ int WEAK HID_GetInterface(u8* interfaceNum) return USB_SendControl(TRANSFER_PGM,&_hidInterface,sizeof(_hidInterface)); } -int WEAK HID_GetDescriptor(int i) +int WEAK HID_GetDescriptor(int /* i */) { return USB_SendControl(TRANSFER_PGM,_hidReportDescriptor,sizeof(_hidReportDescriptor)); } @@ -510,11 +508,11 @@ void Keyboard_::releaseAll(void) size_t Keyboard_::write(uint8_t c) { - uint8_t p = press(c); // Keydown - uint8_t r = release(c); // Keyup - return (p); // just return the result of press() since release() almost always returns 1 + uint8_t p = press(c); // Keydown + release(c); // Keyup + return p; // just return the result of press() since release() almost always returns 1 } #endif -#endif /* if defined(USBCON) */
\ No newline at end of file +#endif /* if defined(USBCON) */ |