Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
void __fastcall CanReceive::Execute()
{
HANDLE hEvent;
read = write = 0;
Priority = tpNormal;
FreeOnTerminate = true;
hEvent = CreateEvent(NULL, false, false, "");
FT_SetEventNotification(ftHandle, FT_EVENT_RXCHAR, hEvent);
while(Terminated == False)
{
WaitForSingleObject(hEvent, INFINITE);
EnterCriticalSection(&Form1->CS);
usb_Read(&RxMessage[write]);
if(++write >= BUFFERSIZE){
write = 0;
}
LeaveCriticalSection(&Form1->CS);
}
}
btbass said:Look for 'CreateEvent' and 'WaitForSingleObject' in the msdn docs.
Here is a thread I use to get the interrupt from a usb dongle.