TMR.CreateH (FUN)

By use of this function of the CAA_Timer.libray a timer object is created. The entry xCyclic determines an unique or cyclic execution, the timer interval ctIntervall determines the period for sending the event defined in eTimer. Within CAA_Callback.library the range 9900-9999 is reserved for timer events. CB.TIMERS is the default event class, CB.DRIVER the default source. Nevertheless it is possible to send other types of events,for example for checking callback functions; however the event class and the source then have to be adapted according to the documentation of  CAA_Callback.library. By entry xHardware the typ of the timer (hardware or software timer ) is selected. Via entry dwParam a value can be transmitted to the callback function.

Input:

xCyclic

BOOL

FALSE: unique execution

TRUE: cyclic execution

ctInterval

CAA.COUNT

Interval of timer (in ns)

dwParam

DWORD

Parameter value for callback function

xHardware

BOOL

TRUE: Hardware timer

FALSE: Software timer

eTimer

CB.EVENT

Callback event 

peError

POINTER TO TMR.ERROR

Dereferencing the pointer will return the error number in case of error and TMR.NO_ERROR else. 

Output:

hTimer

CAA.HANDLE

Handle  of timer