- Linux MultiMedia Studio Computer Accessories User Manual
Mint v4 PC Programming Guide
42
MN1278 05.2001
// timer event handler
void myTimerEventHandler ( void *p, __int16 nTimerEventNumber )
{
cout << "Timer Event” << endl;
}
When a host PC event handler is called, the embedded application running on the controller will continue to
execute.
4.2.2 Event Control Functions
There are various functions that can be used to control events generation. These are detailed below
The user can read which events are currently active using the function:
getEventActive
Any currently pending events can be cleared selectively using the function:
setEventPending
This accepts the same bit pattern as above, clearing a set bit will clear the pending flag for that event. Hence
passing a value of zero will clear all pending interrupts.
Once a handler has been installed the event generation can be disabled by using the function:
setEventDisable
This function accepts a bit pattern as above. Setting a bit will disable the generation of that type of event. Hence
setting this to zero will enable all events which have a handler installed.
The function:
getEventDisable
Will return a bit pattern of any currently disabled interrupts.
By default all digital inputs will generate events when they become active. These digital inputs can be masked so
that they do not generate events using the function:
setIMask
This function accepts a bit pattern which represents all digital inputs, it the bit is set then the digital input will
generate an event when the input becomes active.
Then function:
getIMask
Will return a bit pattern representing those digital inputs which will generate an event when they become active.