Visible to Intel only — GUID: GUID-171BD599-16D9-4715-BA9B-052035016127
Visible to Intel only — GUID: GUID-171BD599-16D9-4715-BA9B-052035016127
SPORT_GET_STATE
Serial Port I/O Function: Returns the baud rate, parity, data bits setting, and stop bits setting of the communications port. This routine is only available for Windows.
Module
USE IFPORT
result = SPORT_GET_STATE (port [,baud] [,parity] [,dbits] [,sbits])
port |
(Input) Integer. The port number. |
baud |
(Output; optional) Integer. The baud rate of the port. |
parity |
(Output; optional) Integer. The parity setting of the port (0-4 = no, odd, even, mark, space). |
dbits |
(Output; optional) Integer. The data bits for the port. |
sbits |
(Output; optional) Integer. The stop bits for the port (0, 1, 2 = 1, 1.5, 2). |
Results
The result type is INTEGER(4). The result is zero if successful; otherwise, a Windows* error value.
Example
USE IFPORT
INTEGER(4) iresult
INTEGER baud
INTEGER parity
INTEGER dbits
INTEGER sbits
iresult = SPORT_GET_STATE( 2, baud, parity, dbits, sbits )
END
See Also
Communications and Communications Functions in the Microsoft* Platform SDK