[PATCH 2/3] Changed serial_ftdi flush to a reset if DC_DIRECTION_ALL
John Van Ostrand
john at vanostrand.com
Tue Sep 5 14:07:56 PDT 2017
The USB reset flushes both buffers, but it also solves a problem
waking up a Cochran DCs.
Signed-off-by: John Van Ostrand <john at vanostrand.com>
---
core/serial_ftdi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/serial_ftdi.c b/core/serial_ftdi.c
index 297d0fa..88e60c2 100644
--- a/core/serial_ftdi.c
+++ b/core/serial_ftdi.c
@@ -508,7 +508,7 @@ static dc_status_t serial_ftdi_flush (dc_custom_io_t *io, dc_direction_t queue)
break;
case DC_DIRECTION_ALL: /**< All directions */
default:
- if (ftdi_usb_purge_buffers(device->ftdi_ctx)) {
+ if (ftdi_usb_reset(device->ftdi_ctx)) {
ERROR (device->context, "%s", ftdi_get_error_string(device->ftdi_ctx));
return DC_STATUS_IO;
}
--
2.4.11
More information about the subsurface
mailing list