|
02/18/2007, 11:30 PM
#360
 Originally Posted by jdcochran
9.12.4 Access serial ports (SetComInfo)
SetComInfo( port, timeout [, baud rate [, parity [, bits
[, stop bits [, control ]]]]] )
With this command you define, how a COM port is accessed.
The command must be invoked before ReadFile or WriteFile. When you call those functions with
„COM1:“ (or any other COM port) as file name, the access is initialized with the given values.
Parameters:
Port................ The port as DOS filename, e.g. "COM1:". Please regard uppercase and colons!
Timeout..........Timespan in milliseconds after which the system should cancel the access
Baud rate The transfer speed. Usually it's 9600, 14400, or 56700, the default if you omit this
parameter is 9600.
Parity..............The parity of a check bit. Possible values are "none", "even", "odd", "mark", and
"space". In most cases, it's "none", which is also the default, rarely "even" or "odd".
Bits.................Number of bits per transmitted byte. Nowadays it's almost always 8 (default), only
in rare cases it's 7, less it almost never used.
Stop bits.........Number of stop bits (duration between bytes). Possible values are 1 (default)
1.5 (pass as quoted string!), and 2.
Control...........Type of flow control. Available are "None", "RTS/CTS" (default), and
"XON/XOFF".
Hint: Depending on system, drivers, and device, not all parameters are always used correctly.
Especially the timeout seems to be handled differently, sometimes it's even ignored completely.
Okay, I guess my searching skills just suck! But I DID look at the documentation, I swear!
EDIT: RC9 - aha! I'm just not that cutting edge.
|
|
|