summaryrefslogtreecommitdiff
path: root/protocol/usb_hid/parser.cpp
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2012-08-14 00:17:31 +0900
committertmk <nobody@nowhere>2012-08-28 21:56:15 +0900
commit895cd4dfa29f0f3c623544f4868ac63e619c69d9 (patch)
tree31d05ec85fa1bc1b1e6ef7f12dccfc3531240798 /protocol/usb_hid/parser.cpp
parent7350b7c6aa300a234244c264b10d1732803c27df (diff)
Add USB HID(host) protocol.(not finished)
Diffstat (limited to 'protocol/usb_hid/parser.cpp')
-rw-r--r--protocol/usb_hid/parser.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/protocol/usb_hid/parser.cpp b/protocol/usb_hid/parser.cpp
new file mode 100644
index 0000000000..cf64322302
--- /dev/null
+++ b/protocol/usb_hid/parser.cpp
@@ -0,0 +1,15 @@
+#include "parser.h"
+
+void KBDReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)
+{
+ PORTB ^= (1<<0);
+/*
+ Serial.print("KBDReport: ");
+ for (uint8_t i = 0; i < len; i++) {
+ PrintHex<uint8_t>(buf[i]);
+ Serial.print(" ");
+ }
+ Serial.print("\r\n");
+*/
+ //PORTC &= ~(1<<7);
+}