Am 28.09.2012 10:43, schrieb Uwe Bonnes:
"Thomas" == Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx> writes:
Thomas> Hi Thomas On Friday, 28. September 2012 09:07:06 Thomas Heller
Thomas> wrote:
>> So, the question is: Is it possible to clear the ft2232h output fifo?
Thomas> ftdi_usb_purge_tx_buffer() will do the job.
Thomas (Heller),
please report back if that is successfull.
Note that (because of the libusb... chaos (*) ;-) I'm not using libftdi.
I used libftdi as a reference to implement my own driver which directly
calls WinUSB functions - I only need windows.
First tests show that a purge_rx_buffer()-like call deletes the data
in the on-chip buffers that the PC has written into the chip. Can
it be that the definitions for SIO_RESET_PURGE_RX and SIO_RESET_PURGE_TX
are swapped? My code for purge_rx_buffer() is:
self._usb_control_msg(_ftdi.FTDI_DEVICE_OUT_REQTYPE,
_ftdi.SIO_RESET_REQUEST,
_ftdi.SIO_RESET_PURGE_RX,
self._index)
with the FTDI_... and SIO_RESET_... definitions
from ftdi.h, libftdi-0.20:
#define SIO_RESET_PURGE_RX 1
#define SIO_RESET_PURGE_TX 2
Thomas
(*) No offense intended!
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|