INT32S DRV_DioReadDOPorts (
PTR_T DeviceHandle,
INT32U dwPortStart,
INT32U dwPortCount,
INT8U * pBuffer );
On the device indicated by the DeviceHandle, it specifies the DO port range and reads back the status of these ports.
Some parameters, such as starting port number (dwPortStart), port count (dwPortCount) and pointer to the user's buffer (pBuffer), are stored in the DRV_DioReadDOPorts.
The user needs to provide a buffer that is large enough to store retrieved data.
| Name | Direction | Range | Description |
| DeviceHandle | input | default | The pointer retrieved from the DRV_DeviceOpen which specifies the target device. |
| dwPortStart | input | default | The starting port number. |
| dwPortCount | input | default | The port count. |
| pBuffer | output | default | The pointer to the user's buffer that saves DO data. |
| 1. 0 | Successful. |
| 2. InvalidDeviceHandle | The DeviceHandle is NULL. |
| 3. InvalidChannel | The port is configured incorrectly. The starting port number (dwPortStart) or the sum of the starting port number and the port count (dwPortCount) should not exceed the total DO port number. |
| 4. InvalidBuffer | The user's buffer is configured incorrectly. It should not be NULL. |