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