question

AlexHyx-0244 avatar image
0 Votes"
AlexHyx-0244 asked JeanineZhang-MSFT commented

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?


c++
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AlexHyx-0244

According to your description, it is more related to FTDI. I suggest you could post the issue to FTDI Community for better help.


0 Votes 0 ·

0 Answers