Specifications
CHAPTER 4
Software Support
Configuring the PC System 61
A pointer to an RSComConfig data structure is passed in the csParam field.
Field descriptions
RSComFig[0] Contains the configuration for COM1.
RSComConfig[1] Contains the configuration for COM2.
type field Specifies what type of connection to make: rsNULLComPort,
rsModemComPort, rsPrinterComPort, rsSpoolComPort,
rsComToolBoxComPort, or rsIgnore.
vRefNum parameter
The value of this parameter is the volume reference number, dirID
is the directory ID, type is the port type (ModemComPort, and so
on), and fileNamePtr is the pointer to the name of the spool file.
PC port connected to the null device
Any output from the PC system is ignored.
PC port connected to the modem or printer port
PC system controls the port by means of the UART emulation in
hardware on the 12” or 7” card. For example, when the PC system
sets the baud rate divisor in the UART emulation register, the
interface driver intercepts the operation and translates the action to
a control call to the driver for the modem or printer port.
PC port connected to a spool file
All output from the PC system is captured and written to the
specified file. The driver opens and closes the file as needed.
type field is set to rsIgnore
The port’s configuration does not change.
—> ioRefNum word Device driver’s reference number.
—> csCode word Equals rsSetComPortConfig.
—> csParam+0 long Pointer to RSComConfig.
typedef struct{
short type; // Port type (rsModemComPort,
rsPrinterComPort, etc.)
short vRefNum; // Volume reference number for serial
spool file
long dirID; // Directory ID
long fileNamePtr
;
// Pointer to the filename
} RSComConfig[2], *RSComConfigPtr;