dear all
I have a type of steute foot switch which use the ftdi chip.
The footswitch work flow is like this:
The foot switch has a usb interface , and connected with an embedded system.
when I click the switch, the ftdi chip will send keycode byte through the usb
interface.
now , I want to write a programe to receive the keycode.
I hope to set a charater receieve event to notice me the bytes arrived.
I don't want to use the polling way.
Below is a windows version demo which the steute company gave me.
It uses the FTD2XX.dll
*******************************************************************
hEvent = CreateEvent(NULL, false, false, NULL);
EventMask = FT_EVENT_RXCHAR;
ftStatus = FT_SetEventNotification(ftHandle, EventMask, hEvent);
WaitForSingleObject(hEvent, 1000);
FT_GetStatus(ftHandle, &RxBytes, &TxBytes1, &EventDWord);
if (RxBytes > 0)
{
ftStatus = FT_Read(ftHandle, RxBuffer, RxBytes, &BytesRecieved);
}
*******************************************************************
I don't find the similar function <FT_SetEventNotification> in the libftdi-0.18.
Could somebody tell what I should do if I want to write the linux demo
Thanks advanced!
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|