Skip to content

Commit

Permalink
Update HID.h with report types (#602)
Browse files Browse the repository at this point in the history
Add missing #define statements when compared to AVR library.
Support for readbytes with a byte/uint8_t buffer
  • Loading branch information
Spegs21 committed Feb 22, 2022
1 parent dc99cd2 commit 3fd369e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cores/arduino/USB/USBAPI.h
Expand Up @@ -117,6 +117,7 @@ class Serial_ : public arduino::HardwareSerial, 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
Expand Down
5 changes: 5 additions & 0 deletions libraries/HID/HID.h
Expand Up @@ -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
Expand Down

0 comments on commit 3fd369e

Please sign in to comment.