Use function AioSetCntCallBackProc to register the callback function.
Ret = AioSetCntCallBackProc ( Id , CntChannel , CallBackProc , CntEvent , Param)
Specifies the pointer of the created callback function in the CallBackProc.
Please set as follows in each language.
When callback function name is CallBackProc
VC:Ret = AioSetCntCallBackProc(Id, 0 , CallBackProc,
CNTE_DATA_NUM , this);
Specifies the event factor by macro or numeric value from the following
range in the CntEvent.
CntEvent has the following meanings in bit, it can be specified by a combination
of these bits.
Event factor |
Macro |
Value |
Event comparison count match |
CNTE_DATA_NUM |
00000010H |
Event count overrun |
CNTE_ORERR |
00010000H |
Counter operation error |
CNTE_ERR |
00010001H |
Event comparison
count match (Macro: CNTE_DATA_NUM
Value: 00000010H)
The event is generated when the counter comparison count match is established.
Event count
overrun (Macro: CNTE_ORERR Value:
00010000H)
The event is generated when counter overrun occurs.
Counter operation
error (Macro: CNTE_ERR
Value: 00010001H)
This event is generated when the counter action stops by the counter operation
error.
Sets the pointer to any parameter passed to callback function in the Param.