
MVI-ADM ♦ 'C' Programmable Serial Port Library Functions
'C' Programmable Application Development Module Developer's Guide
ProSoft Technology, Inc. Page 235 of 342
February 20, 2013
9.1 Serial Port API Initialization Functions
MVIsp_Open
Syntax
int MVIsp_Open(int comport, BYTE baudrate, BYTE parity, BYTE wordlen,
BYTE stopbits);
Parameters
Communications Port to open
Parity setting for this port
Number of bits for each character
Number of stop bits for each character
Description
MVIsp_Open acquires access to a communications port. This function must be
called before any of the other API functions can be used.
comport specifies which port is to be opened. The valid values for the module are
COM1 (corresponds to PRT1 (CFG on MVI69)), COM2 (corresponds to PRT2
(PRT1 on MVI69)), and COM3 (corresponds to PRT3(PRT2 on MVI69)).
Note: PRT3 is available on MVI46 and MVI56 only.
baudrate is the desired baud rate. The allowable values for baudrate are shown
in the following table.
Valid values for parity are PARITY_NONE, PARITY_ODD, PARITY_EVEN,
PARITY_MARK, and PARITY_SPACE.
wordlen sets the word length in number of bits per character. Valid values for
word length are WORDLEN5, WORDLEN6, WORDLEN7, and WORDLEN8.
Comentarios a estos manuales