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: GR-PEACH_HVC-P2_sample_client mbed-os-storage-access GR-PEACH_Digital_Signage GR-PEACH_Audio_Playback_Sample ... more
Fork of USBHost by
Revision 40:cdc0d2ab4678, committed 2017-03-17
- Comitter:
- dkato
- Date:
- Fri Mar 17 01:29:52 2017 +0000
- Parent:
- 39:4a7c5479dc23
- 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;
}
}
}
