libftdi Archives

Subject: Wait on event

From: Matt Barclay <mbarclay@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Thu, 16 Aug 2012 14:05:27 -0600
Hello,

The FTDI D2xx API has an FT_SetEventNotification() function that lets you register a callback when some event has occurred.  I'm trying to block my thread until pins on the FT4232 BDBUS go low.  That tells my thread that the slave SPI chips have data in their FIFO's that need to be unloaded.  Currently my read thread is just spinning on a request for GET_BITS_LOW, which is ugly and might lead to buffer overflow on my slave SPI chips.

Looking in ftdi.h, there's a WAIT_ON_LOW 0x89, but I don't see that used anywhere.  Is there any way to get event notification on input GPIO line change with libftdi?

Thanks,
Matt



libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx


Current Thread