ZTIMER_eOpen
ZTIMER_teStatus ZTIMER_eOpen(
uint8 *pu8TimerIndex,
ZTIMER_tpfCallback pfCallback,
void *pvParams,
uint8 u8Flags);
Description
This function is used to open the specified software timer. A list of parameter values for the timer must be provided as well as a user-defined callback function that will be used to perform any operations required on expiration of the timer.
The callback function has the following prototype:
typedef void (*ZTIMER_tpfCallback)(void * pvParam );
where pvParam is a pointer to the timer parameters.
The function also includes a parameter u8Flags, which specifies whether the timer should allow or prevent sleep. When activity checks are made to decide whether the device can enter sleep mode, the value of this flag determines if the (running) timer will stop the device from going to sleep.
Before a timer is opened, it must have been initialized in a call to ZTIMER_eInit().
Parent topic:ZTIMER_eOpen
Parameters
pu8TimerIndex Pointer to location containing the index number of the timer in the list of timers initialized using ZTIMER_eInit()
pfCallback Pointer to the user-defined callback function for the timer
pvParams Pointer to a list of parameter values for the timer u8Flags Flag indicating whether the timer should allow or prevent sleep, one of:
ZTIMER_FLAG_ALLOW_SLEEP
ZTIMER_FLAG_PREVENT_SLEEP
Parent topic:ZTIMER_eOpen
Returns
E_ZTIMER_OK (timer successfully opened)
E_ZTIMER_FAIL (timer not opened)
Parent topic:ZTIMER_eOpen
Parent topic:ZigBee Timer functions