![National Instruments PCMCIA Series Скачать руководство пользователя страница 34](http://html1.mh-extra.com/html/national-instruments/pcmcia-series/pcmcia-series_getting-started_709070034.webp)
Chapter 4
Using Your Serial Hardware
©
National Instruments Corporation
4-5
PCMCIA Serial for Windows 95
General Programming Requirements
Once installed, the NI Serial software is integrated into the standard
Windows 95 communications software. NI serial ports are used like any
other Windows 95 communications (COM) port. Windows 95 has standard
communication functions for use within either 16-bit (Win16) applications
or 32-bit (Win32) applications.
Setting the Maximum Baud Rate for a 16-Bit Application
To select 115,200 baud from a 16-bit (Win16) application written in C,
you should define the following constant in your program as follows:
#define CBR_115200 0xff20
You can then use this constant as you would any other baud rate value in
your Windows communication calls. For example, you can place it into a
DCB structure and pass it to
SetCommState
. For a Win32 application, do
not use the constant shown here for 115,200 baud. Use the constant defined
in the Win32 communications header file provided with your compiler.
Other Programming Points
As you begin developing your application, remember that you must use
the standard Microsoft Windows serial communication functions. For
information about Microsoft Windows serial communication functions,
refer to the Win32 Software Development Kit, Online help for Win32
Overviews and Win32 Reference.
If you have LabVIEW or LabWindows and want to use it with your serial
hardware, refer to your LabVIEW or LabWindows documentation for
information about serial I/O functions.