Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3fd369e

Browse filesBrowse files
authored
Update HID.h with report types (#602)
Add missing #define statements when compared to AVR library. Support for readbytes with a byte/uint8_t buffer
1 parent dc99cd2 commit 3fd369e
Copy full SHA for 3fd369e

File tree

2 files changed

+6
-0
lines changed
Filter options

2 files changed

+6
-0
lines changed

‎cores/arduino/USB/USBAPI.h

Copy file name to clipboardExpand all lines: cores/arduino/USB/USBAPI.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ class Serial_ : public arduino::HardwareSerial, arduino::PluggableUSBModule
117117
operator bool();
118118

119119
size_t readBytes(char *buffer, size_t length);
120+
size_t readBytes( uint8_t *buffer, size_t length) { return readBytes((char *)buffer, length); }
120121

121122
// This method allows processing "SEND_BREAK" requests sent by
122123
// the USB host. Those requests indicate that the host wants to

‎libraries/HID/HID.h

Copy file name to clipboardExpand all lines: libraries/HID/HID.h
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@
5454
#define HID_BOOT_PROTOCOL 0
5555
#define HID_REPORT_PROTOCOL 1
5656

57+
// HID Request Type HID1.11 Page 51 7.2.1 Get_Report Request
58+
#define HID_REPORT_TYPE_INPUT 1
59+
#define HID_REPORT_TYPE_OUTPUT 2
60+
#define HID_REPORT_TYPE_FEATURE 3
61+
5762
typedef struct
5863
{
5964
uint8_t len; // 9

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.