<< Previous | Next >>

cof_serXputc

void cof_serXputc ( int c ); /* where X is A-F */

Description

This single-user cofunction writes a character to serial port X, yielding to other tasks when the input buffer is locked. This function is non-reentrant.

The functions cof_serEputc() and cof_serFputc() may be used with the Rabbit 3000 or 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: cof_serXputc(int port, ...), where "port" is one of the macros SER_PORT_A through SER_PORT_F.

Parameters

c
Character to write.

Library

RS232.LIB

Example

// echoes characters
main() {
int c;
serAopen(19200);
loopinit();
while (1) {
loophead();
wfd c = cof_serAgetc();
wfd cof_serAputc(c);
}
serAclose();
}


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