INT32S DRV_FDOStart( PTR_T DeviceHandle, INT16U wCyclic, INT32U dwCount, VOID * pBuf );
This function is used in PCI-1755.
On the device indicated by the DeviceHandle, it initiates the FDO
(Fast Digital Output) operations by specifying the output data count, the
data buffer and the cyclic mode.
This function can be implemented by calling the DRV_FDOCheck.
The output buffer (pBuf) needs to be initialized and loaded data in advance. Since the FDO channels of PCI-1755 can be set to 8, 16 or 32 bits, the data format (data size of each), as concerned with the FDO channel number setting, can be byte, word or double word. Please refer to the Hardware Manual for details.
| Name | Direction | Range | Description |
| DeviceHandle | input | default | The pointer retrieved from the DRV_DeviceOpen which specifies the target device. |
| Cyclic | input | 0-1 |
0: Non-cyclic mode, the FDO operation will stop after the data transfer is finished. There is no restriction for buffer (pBuf) size and output data count (dwCount). 1: Cyclic mode, the buffer (pBuf) size depends on the hardware property and should be larger than the FIFO size (FIFO of PCI-1755 is 32K bytes). |
| dwCount | input | default | The converted data count. The buffer size is the count multiplied by the data size of each (byte, word or double word). |
| pBuf | output | default | The pointer to indicate
the output data buffer. The buffer will be divided into two halves to support the loading and the output respectively. The user needs to call the DRV_FDOCheck to check whether the first half or the second half of the buffer is vacant and to load data in time in order to avoid data underrun. To stop the operation, the DRV_FDOStop must be called. The first half and the second half of the buffer are equal; therefore, the dividing number is dwCount/2. However, if the user sets the data count (dwCount) to an odd number, the first half of the buffer will be larger than the second half and the dividing number will be (dwCount+1)/2. |
| 1. 0 | Successful. |
| 2. InvalidDriverHandle | The DeviceHandle is NULL. |
| 3. InvalidCountNumber | The data count (dwCount) is 0 (invalid). |
| 4. Other value | Please reference ErrorCodes |