13
Fastcom
®
: 422/X-PCIe
PROGRAMMING
To interface with the serial ports on the Fastcom: 422/X-PCIe in a Windows application, your code will use the
standard Win32 COM API. Documentation pertaining to how to use the Win32 API is beyond the scope of this
document. For more information on using the API, refer to the “Using Communications Resources” in the MSDN.
In addition to the Win32 API, you can also use several special Fastcom-specific commands that allow you to
accomplish all of the options from the
Fastcom Serial Settings
property page. These commands, as well as the
custom structures used in them, are defined in the serialfc.h header file.
Fastcom SerialFC Serial Setting
DeviceIOControl
dwIoControlCode
Termination
IOCTL_FASTCOM_{ENABLE, DISABLE}_TERMINATION
Echo Cancel
IOCTL_FASTCOM_{ENABLE,
DISABLE}_ECHO_CANCEL
Sampling Rate
IOCTL_FASTCOM_SET_SAMPLE_RATE
RS 485
IOCTL_FASTCOM_{ENABLE, DISABLE}_RS485
Tx FIFO Trigger Level
IOCTL_FASTCOM_SET_TX_TRIGGER
Tx FIFO Trigger Level
IOCTL_FASTCOM_SET_RX_TRIGGER
Refer to the SerialFC\examples directory on the Fastcom CD or in the downloaded zip file for some example C
programs that demonstrate how to use the Fastcom-specific serial settings as well as providing a general sense
of how to use the Win32 API.