Function
Specifies the callback function for carray/borrow interrupt event.
Format
Ret = CntSetCarryBorrowCallbackProc ( Id , CallBackProc , Param )
Parameters
Id [ C: short ] [ Python: ctypes.c_short ]
Specifies the device ID retrieved from CntInit.
CallBackProc [ C: PCNT_CARRY_BORROW_CALLBACK ] [ Python: PCNT_CARRY_BORROW_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 carray/borrow interrupt function of hardware. After setting the interrupt callback setting, sets the interrupt event, the callback function is called when the interrupt occurs.
Example
C, C++ |
Ret = CntSetCarryBorrowCallbackProc (Id, CallBackProc, Param); |
Python |
Ret = ccnt.CntSetCarryBorrowCallbackProc (Id, CallBackProc, Param) |
See Also
CntSetCarryBorrowEvent PCNT_CARRY_BORROW_CALLBACK