how works CreateEvent from Windows? and how use the function FT_SetEventNotification from FTDI?
Hi, im trying to understand the function FT_SetEventNotification and im not sure what i can do with that. I understood that the function allows create a custom event that fire when occurs a data from Rx for example. That is correct? and if so, how is possible with a C++ project?
I try create a function: void WINAPI DataReceived(){ return; }
and in a method of class:
HANDLE hEvent;
hEvent = CreateEvent(NULL, false, false, "MyEvent");
FT_STATUS_I = FTDI_I->SetEventNotification(FT_EVENT_RXCHAR | FT_EVENT_MODEM_STATUS, hEvent);
WaitForSingleObject(hEvent, INFINITE);
When i call WaitForSingleObject(), it stops until receive Data. But it is posible to make that an event fire a function like an interrupt?