Function
Specifies the callback function for the timer interrupt event.
Format
Ret = CntSetTimeUpCallBackProc ( Id , CallBack , Param )
Parameters
Id [C: short] [Python: ctypes.c_short]
Specifies the device ID retrieved from CntInit.
CallBack [C: PCNT_TIMEUP_CALLBACK] [Python: PCNT_TIMEUP_CALLBACK]
Specifies the address of callback function.
Param [C:void *] [Python: ctypes.c_void_p]
Specifies the parameter passed to the callback function.
Return Value
Ret [C: long] [Python: ctypes.c_long]
Definition |
Value |
Description |
CNT_ERR_SUCCESS |
0 |
Normal Complete |
CNT_ERR_DLL_INVALID_ID |
10001 |
Invalid ID is specified. |
CNT_ERR_DLL_CALLBACK |
10400 |
Invalid address of callback function. |
The other errors: (See also: Details of Error Code)
Remarks
It is the function which accept the interrupt by using the timer interrupt function of hardware.
After setting the interrupt callback setting, sets the interrupt event,
the callback function is called when the interrupt occurs.
This function cannot be used with CPSN-CNT-3202I.
Example
C |
Ret = CntSetTimeUpCallBackProc(Id, CallBack, Param); |
Python |
Ret = ccnt.CntSetTimeUpCallBackProc(Id, CallBack, Param) |
See Also
CntSetTimeUpEvent PCNT_TIMEUP_CALLBACK