Support Isochronous transfer additionally
Dependents: USBHostC270_example_GR-PEACH USBHostDac_example USBHostDac_Audio_in_out
Fork of USBHost_custom by
Revision 40:cdc0d2ab4678, committed 2017-03-17
- Comitter:
- dkato
- Date:
- Fri Mar 17 01:29:52 2017 +0000
- Parent:
- 39:4a7c5479dc23
- Child:
- 41:5c3ebf7372ee
- Commit message:
- Fixed writeBuf transmission size of USBHostSerial class.
Changed in this revision
| USBHostSerial/USBHostSerial.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;
}
}
}
