From 076ab63f83e60cc77e83aca0f9d53422ec6c1642 Mon Sep 17 00:00:00 2001 From: Spegs21 Date: Wed, 17 Feb 2021 15:38:07 -0500 Subject: [PATCH 1/2] Update HID.h Add missing #define statements when compared to AVR library. --- libraries/HID/HID.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/HID/HID.h b/libraries/HID/HID.h index 0148daeaf..698c4a0a7 100644 --- a/libraries/HID/HID.h +++ b/libraries/HID/HID.h @@ -54,6 +54,11 @@ #define HID_BOOT_PROTOCOL 0 #define HID_REPORT_PROTOCOL 1 +// HID Request Type HID1.11 Page 51 7.2.1 Get_Report Request +#define HID_REPORT_TYPE_INPUT 1 +#define HID_REPORT_TYPE_OUTPUT 2 +#define HID_REPORT_TYPE_FEATURE 3 + typedef struct { uint8_t len; // 9 From 0d592609cef7317e0f54364481e8413b2ca1dad0 Mon Sep 17 00:00:00 2001 From: Spegs21 Date: Wed, 3 Mar 2021 11:16:43 -0500 Subject: [PATCH 2/2] Support for readbytes with a byte/uint8_t buffer --- cores/arduino/USB/USBAPI.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cores/arduino/USB/USBAPI.h b/cores/arduino/USB/USBAPI.h index c5cec6257..0cf381e1c 100644 --- a/cores/arduino/USB/USBAPI.h +++ b/cores/arduino/USB/USBAPI.h @@ -120,6 +120,7 @@ class Serial_ : public Stream, public arduino::PluggableUSBModule operator bool(); size_t readBytes(char *buffer, size_t length); + size_t readBytes( uint8_t *buffer, size_t length) { return readBytes((char *)buffer, length); } // This method allows processing "SEND_BREAK" requests sent by // the USB host. Those requests indicate that the host wants to