NervousPuppySprintTwo

Dependencies:   C12832_lcd Servo USBHost mbed

Fork of USBHostSerial_HelloWorld by Samuel Mokrani

Files at this revision

API Documentation at this revision

Comitter:
samux
Date:
Wed Mar 13 10:32:40 2013 +0000
Parent:
1:6b743a29c48a
Child:
3:f2c385ba571e
Commit message:
Use latest USBHost

Changed in this revision

USBHost.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/USBHost.lib	Tue Mar 12 17:33:20 2013 +0000
+++ b/USBHost.lib	Wed Mar 13 10:32:40 2013 +0000
@@ -1,1 +1,1 @@
-https://mbed.org/users/mbed_official/code/USBHost/#b320d68e98e7
+https://mbed.org/users/mbed_official/code/USBHost/#e48791a1ef18
--- a/main.cpp	Tue Mar 12 17:33:20 2013 +0000
+++ b/main.cpp	Wed Mar 13 10:32:40 2013 +0000
@@ -8,13 +8,20 @@
     USBHostSerial serial;
     
     while(1) {
+    
+        // try to connect a serial device
         while(!serial.connect())
             Thread::wait(500);
         
+        // in a loop, print all characters received
+        // if the device is disconnected, we try to connect it again
         while (1) {
+        
+            // if device disconnected, try to connect it again
             if (!serial.connected())
                 break;
 
+            // print characters received
             while (serial.available()) {
                 printf("%c", serial.getc());
             }