Version of USBDevice that works for KL25Z on Mbed OS2.
Fork of USBDevice by
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]); }