22
Rabbit 2000 Development Kit
4.3 Serial Communication Drivers
The interface to the Rabbit serial library,
RSERIAL.LIB
, is designed to provide users with
a set of functions that send and receive entire blocks of data without yielding to other
tasks, a set of single user cofunctions that send and receive data but yield to other tasks,
and a set of circular buffer functions.
The naming convention is
serXfn
:
ser - serial
X - the port being used: A, B, C, or D
fn - the function being implemented
For example,
serBgetc()
is the serial port B function
getc()
, which returns a charac-
ter.
The Rabbit serial functions are listed in the following groups.
Open and Close Functions
Non-Cofunction Blocking Input Functions
Non-Cofunction Blocking Output Functions
Single-User Cofunction Input Functions
Single-User Cofunction Output Functions
Circular Buffer Functions
4.3.1 Open and Close Functions
The open and close functions enable and disable serial communication over the specified
port.
int serXopen (long baud);
Currently only 8N1 transmission (8 data bits, no parity, 1 stop bit) is supported. The
open
function sets
up the interrupt service routine vector.
Parameters
baud
—desired baud rate in bits per second
Return Value
1—The baud rate set on the Rabbit is the same as the input baud rate.
0—The baud rate set on the rabbit does not match the input baud rate.
int serXclose ( );
Disables the serial port interrupt service routine.
Parameters
None.
Return Value
1
Summary of Contents for 2000
Page 1: ...Rabbit 2000 Microprocessor Development Kit Getting Started 010118 D...
Page 4: ...Rabbit 2000 Development Kit...
Page 9: ...4 Rabbit 2000 Development Kit...
Page 21: ...16 Rabbit 2000 Development Kit...
Page 35: ...30 Rabbit 2000 Development Kit...
Page 36: ...Getting Started Manual Schematics...
Page 38: ...B NONE B NONE...
Page 39: ...B NONE B NONE...
Page 41: ...B NONE B NONE...
Page 43: ......