summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar John Van Ostrand <john@vanostrand.com>2017-09-05 17:07:56 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-09-06 08:30:40 -0700
commit166eb17ac2d1e33ed3d6362f31a1d397dae3566a (patch)
tree15f924ff857af3c964eb57673d29d40ee81c11e8 /core
parent928621357ca283905dd973b0f97d17b41b5841ea (diff)
downloadsubsurface-166eb17ac2d1e33ed3d6362f31a1d397dae3566a.tar.gz
Changed serial_ftdi flush to a reset if DC_DIRECTION_ALL
The USB reset flushes both buffers, but it also solves a problem waking up a Cochran DCs. Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r--core/serial_ftdi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/serial_ftdi.c b/core/serial_ftdi.c
index 297d0fa20..88e60c25e 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;
}