DRV_QCounterConfigSys

INT32S DRV_QCounterConfigSys (
   PTR_T DeviceHandle,
   PT_QCounterConfigSys *lpQCounterConfigSys );

Purpose

On the device indicated by the DeviceHandle, it configures the system parameters of the device.

Parameters

Some parameters, such as system clock rate (SysClock), timer base period (TimeBase), counter period multiplier (TimeDivider) and cascade mode (CascadeMode), are stored in the PT_QCounterConfigSys, structure pointed by the lpQCounterConfigSys.

Name Direction Range Description
DeviceHandle input default The pointer retrieved from DRV_DeviceOpen which specifies the target device.
lpQCounterConfigSys input / output default The pointer to indicate the user-prepared structure PT_QCounterConfigSys that stores system clock rate (INT16U SysClock), timer base period (INT16U TimeBase), counter period multiplier (INT16U TimeDivider) and cascade mode (INT16U CascadeMode).

Return

   1. 0 Successful.
   2. InvalidDriverHandle The Devicehandle is NULL.
   3. Other value Please reference ErrorCodes.