BL4S100 User’s Manual
79
4.4.4 Serial Communication
Library files included with Dynamic C provide a full range of serial communications sup-
port. The
RS232.LIB
library provides a set of circular-buffer-based serial functions. The
PACKET.LIB
library provides packet-based serial functions where packets can be delim-
ited by the 9th bit, by transmission gaps, or with user-defined special characters. Both
libraries provide blocking functions, which do not return until they are finished transmit-
ting or receiving, and nonblocking functions, which must be called repeatedly until they
are finished. For more information, see the
Dynamic C User’s Manual
and Technical Note
213,
Rabbit Serial Port Software
.
Use the following function calls with the BL4S100.
serMode
int serMode(int mode);
FUNCTION DESCRIPTION
This function call sets the serial interfaces used by your application program. Call this
function after executing
serXopen()
and before using any other serial port function
calls.
PARAMETER
mode
the defined serial port configuration
RETURN VALUE
0 if valid mode selected,
-EINVAL
if not.
Mode
Serial Port D
Serial Port F
0
RS-232, 3-wire
RS-232, 3-wire
1
RS-232, 5-wire
RTS/CTS