USB device stack

Dependents:   MATSU-bed_blinky MATSU-bed_detection

Fork of USBDevice by mbed official

Revision:
11:eeb3cbbaa996
Parent:
6:d0945750af57
Child:
32:37f14e05bfd7
diff -r 1e3d126a322b -r eeb3cbbaa996 USBSerial/USBSerial.cpp
--- a/USBSerial/USBSerial.cpp	Thu May 30 17:16:57 2013 +0100
+++ b/USBSerial/USBSerial.cpp	Mon Aug 05 14:13:36 2013 +0300
@@ -27,7 +27,7 @@
 }
 
 int USBSerial::_getc() {
-    uint8_t c;
+    uint8_t c = 0;
     while (buf.isEmpty());
     buf.dequeue(&c);
     return c;
@@ -52,7 +52,7 @@
 
     //we read the packet received and put it on the circular buffer
     readEP(c, &size);
-    for (int i = 0; i < size; i++) {
+    for (uint32_t i = 0; i < size; i++) {
         buf.queue(c[i]);
     }