Skip to content

Commit d7b654b

Browse files
Kenneth Newwoodobra
Kenneth Newwood
authored andcommitted
Break out the size of a USB keyboard HID packet into a macro.
Originally from arduino#1391
1 parent 6eef453 commit d7b654b

File tree

1 file changed

+2
-1
lines changed
  • hardware/arduino/avr/cores/arduino

1 file changed

+2
-1
lines changed

hardware/arduino/avr/cores/arduino/USBAPI.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,12 @@ extern Mouse_ Mouse;
160160
#define KEY_F12 0xCD
161161

162162
// Low level key report: up to 6 keys and shift, ctrl etc at once
163+
#define KEYREPORT_KEYCOUNT 0x06
163164
typedef struct
164165
{
165166
uint8_t modifiers;
166167
uint8_t reserved;
167-
uint8_t keys[6];
168+
uint8_t keys[KEYREPORT_KEYCOUNT];
168169
} KeyReport;
169170

170171
class Keyboard_ : public Print

0 commit comments

Comments
 (0)