Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mbed_11U24_CapacitorDose_V001
Diff: USBSerial/USBSerial.cpp
- Revision:
- 11:eeb3cbbaa996
- Parent:
- 6:d0945750af57
- Child:
- 32:37f14e05bfd7
- Child:
- 64:c7639faed2eb
--- 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]);
}