]> git.gir.st - tmk_keyboard.git/blob - protocol/usb_hid/parser.cpp
66e949518e04cbcbf4c39bcb068ab8b53d2521d2
[tmk_keyboard.git] / protocol / usb_hid / parser.cpp
1 #include <cstring.h>
2
3 #include "parser.h"
4 #include "usb_hid.h"
5
6 #include "debug.h"
7
8
9 report_keyboard_t usb_hid_keyboard_report;
10 uint16_t usb_hid_time_stamp;
11
12
13 void KBDReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)
14 {
15 ::memcpy(&usb_hid_keyboard_report, buf, sizeof(report_keyboard_t));
16 usb_hid_time_stamp = millis();
17
18 debug("KBDReport: ");
19 debug_hex(usb_hid_keyboard_report.mods);
20 debug(" --");
21 for (uint8_t i = 0; i < 6; i++) {
22 debug(" ");
23 debug_hex(usb_hid_keyboard_report.keys[i]);
24 }
25 debug("\r\n");
26 }
Imprint / Impressum