Clears the event queue.
GxFpgaDiscardEvents (nHandle, nEventType, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX3700 board. |
nEventType |
SHORT |
Event type. Use the constant GT_EVENT_INTERRUPT (1). No other value is supported. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function clears the event queue and remove all pending events. Setting an event handler using the GxFpgaSetEvent automatically clears the event queue.
The following example uses discard events to reset the queue after lengthy operation:
GxFpgaInitialize (1, &nHandle, &nStatus);
GxFpgaSetEvent(nHandle, GT_EVENT_INTERRUPT, TRUE, NULL, (PVOID)1, &nStatus);
while (TRUE)
{
! wait up to 1000 ms for the event
GxFpgaWaitOnEvent(nHandle, GT_EVENT_INTERRUPT, 1000, &nStatus);
if (nStatus!=0) ! success event occurred
{ printf(“no event occurred - exiting”);
break;
}
else
{ ! do something lengthy …
! now ready to receive more events
GxFpgaDiscardEvents(nHandle, GT_EVENT_INTERRUPT, &nStatus);
GxFpgaInitialize, GxFpgaGetErrorString, GxFpgaWaitOnEvent, GxFpgaSetEvent