Support Isochronous transfer additionally
Dependents: USBHostC270_example_GR-PEACH USBHostDac_example USBHostDac_Audio_in_out
Fork of USBHost_custom by
Diff: USBHostSerial/USBHostSerial.cpp
- Revision:
- 40:cdc0d2ab4678
- Parent:
- 38:dd168a3e4194
--- a/USBHostSerial/USBHostSerial.cpp Thu Mar 16 04:38:43 2017 +0000 +++ b/USBHostSerial/USBHostSerial.cpp Fri Mar 17 01:29:52 2017 +0000 @@ -316,13 +316,14 @@ int i; int c = 0; if (bulk_out) { - while (c < s) { + while (s > 0) { if (dev_connected == false) { break; } i = (s < size_bulk_out) ? s : size_bulk_out; if (host->bulkWrite(dev, bulk_out, (uint8_t *)(b+c), i) == USB_TYPE_OK) { c += i; + s -= i; } } }