diff options
author | tmk <nobody@nowhere> | 2014-07-30 14:37:05 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2014-07-30 14:37:05 +0900 |
commit | adbb86b1ec8b07e86ae7425374e95b82122e48a7 (patch) | |
tree | 0a02e89376f69ef975096af9490034725d8eb751 /protocol/mbed/mbed_driver.cpp | |
parent | 79840c678e13f9a737f80048bc3b9c9c55e3fc77 (diff) | |
parent | a9f5f201ad6b009675fdf16c4447033cc2ac0995 (diff) | |
download | firmware-adbb86b1ec8b07e86ae7425374e95b82122e48a7.tar.gz firmware-adbb86b1ec8b07e86ae7425374e95b82122e48a7.tar.bz2 firmware-adbb86b1ec8b07e86ae7425374e95b82122e48a7.zip |
Merge branch 'mbed' into dev
Diffstat (limited to 'protocol/mbed/mbed_driver.cpp')
-rw-r--r-- | protocol/mbed/mbed_driver.cpp | 41 |
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) +{ +} |