DRV_PWMStartRead

INT32S DRV_PWMStartRead(
   PTR_T DeviceHandle, 
   PT_PWMStartRead *lpPWMStartRead );

Purpose

On the device indicated by the DeviceHandle, it measures both the high and low period of the input pulse on the specified channel. The measurement will be triggered by the first low-to-high transition and will start from this high period. 

Parameters

Some parameters, such as target channel (usChan), high pulse (flHiperiod) and low pulse (flLowperiod) of retrieved PWM, are stored in the PT_PWMStartRead structure pointed by the lpPWMStartRead.

Name Direction Range Description
DeviceHandle input default The pointer retrieved from DRV_DeviceOpen which specifies the target device.
lpPWMStartRead input / output default The pointer to indicate the user-prepared structure PT_PWMStartRead that stores target channel (usChan), high pulse (flHiperiod) and low pulse (flLowperiod) of retrieved PWM.

Return

   1. 0 Successful.
   2. InvalidDeviceHandle The Devicehandle is NULL.
   3. InvalidChannel The current counter (counter of lpPWMStartRead) is out of the range.
   4. Other value Please reference ErrorCodes