USB HID Mouse/Keyboard example for Freedom boards

Dependencies:   USBDevice mbed

Fork of frdm_USB-HID-Mouse-Keyboard_auto by Freescale

Files at this revision

API Documentation at this revision

Comitter:
GregC
Date:
Thu Dec 31 17:24:55 2015 +0000
Commit message:
USB HID Mouse/Keyboard Example for Freedom boards

Changed in this revision

USBDevice.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 92846b9895f1 USBDevice.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/USBDevice.lib	Thu Dec 31 17:24:55 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/USBDevice/#5b7d31d9d3f3
diff -r 000000000000 -r 92846b9895f1 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Dec 31 17:24:55 2015 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include "USBMouseKeyboard.h"
+
+DigitalOut led(LED1);
+USBMouseKeyboard key_mouse;
+
+int main(void) {
+    while (1) {
+        key_mouse.move(60, 0);
+        key_mouse.doubleClick();
+        key_mouse.keyCode(KEY_CAPS_LOCK);
+        key_mouse.printf("hello world from frdm-k64f. \n");
+        wait(2);
+        key_mouse.move(-60, 0);
+        key_mouse.doubleClick();
+        key_mouse.keyCode(KEY_CAPS_LOCK);
+        key_mouse.printf("hello world from frdm-k64f. \n");
+        led = ((key_mouse.lockStatus() & 0x2) >> 1); /* second bit is caps lock */
+        wait(2);
+    }
+}
diff -r 000000000000 -r 92846b9895f1 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Dec 31 17:24:55 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6473597d706e
\ No newline at end of file