]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/tests/usb/device/keyboard/main.cpp
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / tests / usb / device / keyboard / main.cpp
1 #include "mbed.h"
2 #include "USBKeyboard.h"
3
4 //LED1: NUM_LOCK
5 //LED2: CAPS_LOCK
6 //LED3: SCROLL_LOCK
7 BusOut leds(LED1, LED2, LED3);
8
9 //USBKeyboard
10 USBKeyboard keyboard;
11
12 int main(void) {
13 while (1) {
14 keyboard.mediaControl(KEY_VOLUME_DOWN);
15 keyboard.printf("Hello World from Mbed\r\n");
16 keyboard.keyCode('s', KEY_CTRL);
17 keyboard.keyCode(KEY_CAPS_LOCK);
18 leds = keyboard.lockStatus();
19 wait(1);
20 }
21 }
Imprint / Impressum