USBHID Hello World

Dependencies:   mbed USBDevice

Files at this revision

API Documentation at this revision

Comitter:
samux
Date:
Sun Oct 14 13:07:31 2012 +0000
Parent:
5:b1d34990a376
Child:
7:53a2d7e81b22
Commit message:
use mbed official USBDevice library

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
--- a/USBDevice.lib	Wed Nov 30 11:10:44 2011 +0000
+++ b/USBDevice.lib	Sun Oct 14 13:07:31 2012 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/samux/code/USBDevice/#65a34d6b5e22
+http://mbed.org/users/mbed_official/code/USBDevice/#6d85e04fb59f
--- a/main.cpp	Wed Nov 30 11:10:44 2011 +0000
+++ b/main.cpp	Sun Oct 14 13:07:31 2012 +0000
@@ -1,29 +1,29 @@
 #include "mbed.h"
 #include "USBHID.h"
-
+ 
 //We declare a USBHID device. By default input and output reports are 64 bytes long.
 USBHID hid(8, 8);
-
+ 
 Serial pc(USBTX, USBRX);
-
+ 
 //This report will contain data to be sent
 HID_REPORT send_report;
 HID_REPORT recv_report;
-
+ 
 DigitalOut l1(LED1);
-
+ 
 int main(void) {
     send_report.length = 8;
-
+ 
     while (1) {
         
         //Fill the report
         for (int i = 0; i < send_report.length; i++)
             send_report.data[i] = rand() & 0xff;
-
+ 
         //Send the report
         hid.send(&send_report);
-
+ 
         //try to read a msg
         if(hid.readNB(&recv_report)) {
             l1 = !l1;
--- a/mbed.bld	Wed Nov 30 11:10:44 2011 +0000
+++ b/mbed.bld	Sun Oct 14 13:07:31 2012 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/7110ebee3484
+http://mbed.org/users/mbed_official/code/mbed/builds/cd19af002ccc
\ No newline at end of file