<< Previous | Next >>

serXputc

int serXputc( char c ); /* where X is A-F */

Description

Writes a character to serial port X write buffer. This function is non-reentrant.

The functions serEputc() and serFputc() may be used with the Rabbit 3000 and Rabbit 4000.

NOTE Alternatively you can use another form of this function that has been generalized for all serial ports. Instead of substituting for "X" in the function name, the prototype of the generalized function is: serXputc(int port, ...), where "port" is one of the macros SER_PORT_A through SER_PORT_F.

Parameters

c
Character to write to serial port X write buffer.

Return value

0 if buffer locked or full, 1 if character sent.

Library

RS232.LIB

Example

main() {    // echoes characters
int c;
serAopen(19200);
while (1) {
if ((c = serAgetc()) != -1) {
serAputc(c);
}
}
serAclose();
}


Dynamic C Functions << Previous | Next >> rabbit.com