USBHID Hello World

Dependencies:   mbed USBDevice

Files at this revision

API Documentation at this revision

Comitter:
samux
Date:
Fri Nov 11 12:15:20 2011 +0000
Parent:
2:d07a799c6926
Child:
4:1db1bf23561e
Commit message:

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
--- a/USBDevice.lib	Thu Nov 03 12:30:56 2011 +0000
+++ b/USBDevice.lib	Fri Nov 11 12:15:20 2011 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/samux/code/USBDevice/#3ee092469cc8
+http://mbed.org/users/samux/code/USBDevice/#9256c332824a
--- a/main.cpp	Thu Nov 03 12:30:56 2011 +0000
+++ b/main.cpp	Fri Nov 11 12:15:20 2011 +0000
@@ -1,21 +1,21 @@
-#include "mbed.h"
-#include "USBHID.h"
-
-//We declare a USBHID device
-USBHID hid;
-
-//This report will contain data to be sent
-HID_REPORT send_report;
-
-int main(void) {
-    //Fill the report
-    for(int i = 0; i < 64; i++)
-        send_report.data[i] = i;
-    send_report.length = 64;
-    
-    while (1) {
-        //Send the report
-        hid.send(&send_report);
-        wait(0.01);
-    }
-}
+#include "mbed.h"
+#include "USBHID.h"
+
+//We declare a USBHID device
+USBHID hid;
+
+//This report will contain data to be sent
+HID_REPORT send_report;
+
+int main(void) {
+    //Fill the report
+    for(int i = 0; i < 64; i++)
+        send_report.data[i] = i;
+    send_report.length = 64;
+    
+    while (1) {
+        //Send the report
+        hid.send(&send_report);
+        wait(0.1);
+    }
+}
\ No newline at end of file