Skip to content

Commit 9ba38e7

Browse files
committed
Fix an off-by-8 error in the HID ConsumerControl driver that broke things on
Windows devices
1 parent f0b5e7f commit 9ba38e7

File tree

1 file changed

+4
-4
lines changed
  • hardware/arduino/avr/cores/arduino

1 file changed

+4
-4
lines changed

hardware/arduino/avr/cores/arduino/HID.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ const u8 _hidReportDescriptor[] = {
201201
0x09, 0x01, // USAGE (Consumer Control)
202202
0xa1, 0x01, // COLLECTION (Application)
203203
0x85, HID_REPORTID_CONSUMERCONTROL, // REPORT_ID (6)
204+
0x15, 0x00, // LOGICAL_MINIMUM (0)
205+
0x25, 0x01, // LOGICAL_MAXIMUM (1)
206+
0x75, 0x01, // REPORT_SIZE (1)
207+
0x95, 0x08, // REPORT_COUNT (8)
204208
0x09, 0xe2, // USAGE (Mute) 0x01
205209
0x09, 0xe9, // USAGE (Volume Up) 0x02
206210
0x09, 0xea, // USAGE (Volume Down) 0x03
@@ -209,10 +213,6 @@ const u8 _hidReportDescriptor[] = {
209213
0x09, 0xb6, // USAGE (Scan Previous Track) 0x06
210214
0x09, 0xb5, // USAGE (Scan Next Track) 0x07
211215
0x09, 0xb8, // USAGE (Eject) 0x08
212-
0x15, 0x00, // LOGICAL_MINIMUM (0)
213-
0x25, 0x01, // LOGICAL_MAXIMUM (1)
214-
0x75, 0x01, // REPORT_SIZE (1)
215-
0x95, 0x0f, // REPORT_COUNT (8)
216216
0x81, 0x02, // INPUT (Data,Var,Abs)
217217
0xc0,
218218

0 commit comments

Comments
 (0)