Eric S.
2017-01-16 19:46:23 UTC
The file ftdi.hpp contains
enum Direction
{
Input,
Output
};
The file ftdi.cpp contains
int Context::flush(int mask)
{
int ret = 1;
if (mask & Input)
ret &= ftdi_usb_purge_rx_buffer(d->ftdi);
if (mask & Output)
ret &= ftdi_usb_purge_tx_buffer(d->ftdi);
return ret;
}
Since the enumeration assigns the value "0" to Input, the input queue is
never flushed.
The enumeration should be something like
The file ftdi.hpp contains
enum Direction
{
Input = 0x1,
Output = 0x2
};
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+***@developer.intra2net.com
enum Direction
{
Input,
Output
};
The file ftdi.cpp contains
int Context::flush(int mask)
{
int ret = 1;
if (mask & Input)
ret &= ftdi_usb_purge_rx_buffer(d->ftdi);
if (mask & Output)
ret &= ftdi_usb_purge_tx_buffer(d->ftdi);
return ret;
}
Since the enumeration assigns the value "0" to Input, the input queue is
never flushed.
The enumeration should be something like
The file ftdi.hpp contains
enum Direction
{
Input = 0x1,
Output = 0x2
};
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+***@developer.intra2net.com