]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/tests/usb/device/keyboard/main.cpp
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / 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