aboutsummaryrefslogtreecommitdiffstats
path: root/protocol/mbed/mbed_driver.cpp
diff options
context:
space:
mode:
authortmk <hasu@tmk-kbd.com>2015-04-10 01:32:04 +0900
committertmk <hasu@tmk-kbd.com>2015-04-10 01:32:04 +0900
commita074364c3731d66b56d988c8a6c960a83ea0e0a1 (patch)
tree5a4ecf854c41b510b4378bacb7c7228297f8bc58 /protocol/mbed/mbed_driver.cpp
downloadfirmware-a074364c3731d66b56d988c8a6c960a83ea0e0a1.tar.gz
firmware-a074364c3731d66b56d988c8a6c960a83ea0e0a1.tar.bz2
firmware-a074364c3731d66b56d988c8a6c960a83ea0e0a1.zip
Squashed 'tmk_core/' content from commit 05caacc
git-subtree-dir: tmk_core git-subtree-split: 05caaccec92694bb24c8c3c3a9940b96efd4605c
Diffstat (limited to 'protocol/mbed/mbed_driver.cpp')
-rw-r--r--protocol/mbed/mbed_driver.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/protocol/mbed/mbed_driver.cpp b/protocol/mbed/mbed_driver.cpp
new file mode 100644
index 000000000..6c7b16e23
--- /dev/null
+++ b/protocol/mbed/mbed_driver.cpp
@@ -0,0 +1,41 @@
+#include "HIDKeyboard.h"
+#include "host.h"
+#include "host_driver.h"
+#include "mbed_driver.h"
+
+HIDKeyboard keyboard;
+
+
+/* Host driver */
+static uint8_t keyboard_leds(void);
+static void send_keyboard(report_keyboard_t *report);
+static void send_mouse(report_mouse_t *report);
+static void send_system(uint16_t data);
+static void send_consumer(uint16_t data);
+
+host_driver_t mbed_driver = {
+ keyboard_leds,
+ send_keyboard,
+ send_mouse,
+ send_system,
+ send_consumer
+};
+
+
+static uint8_t keyboard_leds(void)
+{
+ return keyboard.leds();
+}
+static void send_keyboard(report_keyboard_t *report)
+{
+ keyboard.sendReport(*report);
+}
+static void send_mouse(report_mouse_t *report)
+{
+}
+static void send_system(uint16_t data)
+{
+}
+static void send_consumer(uint16_t data)
+{
+}