User guide

CIF Peripheral Model - SimpleTimer
96 CoMET Version 5.9 – Tutorial
initialization Instance Data structure and
stores the module id and
pathname in it.
SimpleTimerInitTaskInstance Task
initialization
Modify to set up required
instance data and callback
data structures
SimpleTimerTaskFunction Processing
commences
Unmodified. Simply
suspends. Behavior is
implemented with callbacks
InitDll Unmodified empty function
stub
PreSymlinkInit Unmodified
InitSymlink Unmodified. Sets value of
pAmpiTaskId, used later by
macros.
UninitDll Unmodified empty function
stub
Additional Callback and Helper Functions
Additional Function Event Comment
SetupNextMatch
Helper function Set up callback functions for
Match events. Check TER,
TIER and TIFR registers and
do not proceed if interrupt
high or match or interrupt
disabled.
ClearMatchInterrupts
Helper function Clear MatchInterruptPorts -
called by WriteRegister for
TER, TIER and TFR
Match
Match - GTR value
matches MTR1 value or
MTR2 value
Callback function, called
when a scheduled match
event takes place. This is
scheduled in the
SetupNextMatch function
Unmatch
UnMatch - GTR value
no longer matches
MTR1 value or MTR2
value
Callback function, called
when a scheduled unmatch
event takes place. This is
scheduled in the Match
function