RabbitCore RCM4500W User Manual page 94

C-programmable zigbee core module
Table of Contents

Advertisement

RS-232 flow control on an RS-232 port is initiated in software using the
function call from
RS232.LIB
trol lines are specified using a set of five macros.
SERX_RTS_PORT—Data register for the parallel port that the RTS line is on (e.g., PCDR).
SERA_RTS_SHADOW—Shadow register for the RTS line's parallel port (e.g., PCDRShadow).
SERA_RTS_BIT—The bit number for the RTS line.
SERA_CTS_PORT—Data register for the parallel port that the CTS line is on (e.g., PCDRShadow).
SERA_CTS_BIT—The bit number for the CTS line.
Standard 3-wire RS-232 communication using Serial Ports C and D is illustrated in the following
sample code.
#define CINBUFSIZE
#define COUTBUFSIZE 15
#define DINBUFSIZE
#define DOUTBUFSIZE 15
#define MYBAUD 115200
#endif
main(){
serCopen(_MYBAUD);
serDopen(_MYBAUD);
serCwrFlush();
serCrdFlush();
serDwrFlush();
serDrdFlush();
serCclose(_MYBAUD);
serDclose(_MYBAUD);
}
User's Manual
, where
is the serial port (C or D). The locations of the flow con-
X
15
// set size of circular buffers in bytes
15
// set baud rate
// open Serial Ports C and D
// flush their input and transmit buffers
// close Serial Ports C and D
serXflowcontrolOn
89

Advertisement

Table of Contents
loading

Table of Contents