USB Device library for the STM32F103 with USB Device Firmware Upgrade (DFU) runtime support.
Dependents: STM32F103C8T6_WebUSBDFU STM32F103C8T6_USBDFU STM32F103C8T6_USBDFU dfu_usb_stm32f103
Fork of USBDevice_STM32F103 by
Diff: USBSerial/USBSerial.cpp
- Revision:
- 11:eeb3cbbaa996
- Parent:
- 6:d0945750af57
- Child:
- 32:37f14e05bfd7
--- 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]); }