You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

parser.cpp 442B

1234567891011121314151617
  1. #include "parser.h"
  2. #include "usb_hid.h"
  3. #include "debug.h"
  4. void KBDReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)
  5. {
  6. ::memcpy(&report, buf, sizeof(report_keyboard_t));
  7. time_stamp = millis();
  8. dprintf("input %d: %02X %02X", hid->GetAddress(), report.mods, report.reserved);
  9. for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
  10. dprintf(" %02X", report.keys[i]);
  11. }
  12. dprint("\r\n");
  13. }