USBMouseKeyboard Hello World

Dependencies:   mbed USBDevice

Committer:
samux
Date:
Fri Nov 11 12:12:01 2011 +0000
Revision:
1:980859c25e92
Parent:
0:845782b77b0d
Child:
2:73a1fe1d6599

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
samux 0:845782b77b0d 1 #include "mbed.h"
samux 0:845782b77b0d 2 #include "USBMouseKeyboard.h"
samux 0:845782b77b0d 3
samux 1:980859c25e92 4 //Bus of leds
samux 1:980859c25e92 5 BusOut leds(LED1, LED2, LED3);
samux 1:980859c25e92 6 USBMouseKeyboard key_mouse(REL_MOUSE, &leds);
samux 0:845782b77b0d 7
samux 0:845782b77b0d 8 int main(void) {
samux 0:845782b77b0d 9 while (1) {
samux 0:845782b77b0d 10 key_mouse.mediaControl(KEY_VOLUME_DOWN);
samux 0:845782b77b0d 11 key_mouse.printf("Hello World from Mbed\r\n");
samux 0:845782b77b0d 12 key_mouse.keyCode('s', KEY_CTRL);
samux 0:845782b77b0d 13 key_mouse.move(20, 0);
samux 1:980859c25e92 14 key_mouse.keyCode(KEY_SCROLL_LOCK);
samux 0:845782b77b0d 15 wait(1);
samux 0:845782b77b0d 16 }
samux 0:845782b77b0d 17 }