X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=src%2Fftdi_stream.c;h=f5f128730d74c43f41dfbd8ac11aaf9368075c40;hp=2ad54c0ae2d636c30cc05d207460fde799b52690;hb=5b110dec90393f6951624fe9a9e58c9ae9e43127;hpb=f838a4e3b0466abc34823750e9eef24d785c8232 diff --git a/src/ftdi_stream.c b/src/ftdi_stream.c index 2ad54c0..f5f1287 100644 --- a/src/ftdi_stream.c +++ b/src/ftdi_stream.c @@ -3,6 +3,7 @@ ------------------- copyright : (C) 2009 Micah Dowty 2010 Uwe Bonnes email : opensource@intra2net.com + SPDX-License-Identifier: (LGPL-2.1-only AND MIT) ***************************************************************************/ /*************************************************************************** @@ -41,6 +42,9 @@ #include #include +#ifndef _WIN32 +#include +#endif #include #include "ftdi.h" @@ -169,9 +173,9 @@ ftdi_readstream(struct ftdi_context *ftdi, } /* Purge anything remaining in the buffers*/ - if (ftdi_usb_purge_buffers(ftdi) < 0) + if (ftdi_tcioflush(ftdi) < 0) { - fprintf(stderr,"Can't Purge\n"); + fprintf(stderr,"Can't flush FIFOs & buffers\n"); return 1; }