DRV_CntrEnableEventAndSpecifyEventCounter
INT32S DRV_CntrEnableEventAndSpecifyEventCounte(
PTR_T DeviceHandle,
INT32U dwEventID,
INT32U dwScanStart,
INT32U dwScanCount);
Purpose
Enable a specific counter event, and also specify a range of counter
channels that will be scanned (read) when the specified event occurs.
Parameters
| Name |
Direction |
Range |
Description |
| DriverHandle |
Input |
default |
The
pointer retrieved from the DRV_DeviceOpen
which specifies the target device. |
| dwEventID |
Input |
ADS_EVT_OVERFLOW_CNT0~3 ADS_EVT_UNDERFLOW_CNT0~3
ADS_EVT_INDEX_CNT0~3 ADS_EVT_DI_INTERRUPT0~3
ADS_EVT_OVERCOMPARE_CNT0~3 ADS_EVT_UNDERCOMPARE_CNT0~3
ADS_EVT_INTERRUPT_TIMER4 |
counter event ID users want to enable. |
| dwScanStart |
Input |
default |
start counter channel which will be scaned when the specified
event occurs. |
| dwScanCount |
Input |
default |
counter channel count to be scaned when the specified event
occurs. |
Return
| 1. 0 |
Successful. |
| 2.
InvalidDeviceHandle |
The DeviceHandle is NULL. |
|
3.
InvalidInputParam |
The dwStartStart and dwScanCount
is out of range. |
| 4.
InvalidEventType |
The configured event type is out of
range. |
| 5.
Other value |
Please reference
ErrorCodes |