DRV_TimerCountSetting

INT32S DRV_TimerCountSetting (
   LONG DeviceHandle,
   PT_TimerCountSetting *lpTimerCountSetting );

Purpose

On the device indicated by the DeviceHandle, it specifies a counter to work as a timer by setting a value for down count and starts the operation..

When the timer's count reaches the preset value, an interrupt will occur, please call DRV_EnableEvent function first to enable the interrupt event, DRV_CheckEvent can be used to check the status of the counter.

Parameters

Some parameters, such as target counter channel (counter) and specified count (Count), are stored in the PT_TimerCountSetting structure pointed by the lpTimerCountSetting.

Name Direction Range Description
DeviceHandle input default The pointer retrieved from DRV_DeviceOpen which specifies the target device.
lpTimerCountSetting input / output default The pointer to indicate the user-prepared structure PT_TimerCountSetting that stores target counter channel (INT16U counter) and specified count (INT32U Count).

Return

   1. SUCCESS Successful.
   2. InvalidDeviceHandle The Devicehandle is NULL.
   3. InvalidChannel The target channel is out of range.