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