<< Previous | Next >> | |
|
int serXgetc( void ); /* where X is A-F */
Description
- Get next available character from serial port X read buffer. This function is non-reentrant.
- The functions
serEgetc()
andserFgetc()
may be used with the Rabbit 3000 and Rabbit 4000.Return value
- Success: the next character in the low byte,
0
in the high byte.
Failure: -1, which indicates either an empty or a locked receive buffer.Library
- RS232.LIB
Example
// echoes characters
main() {
int c;
serAopen(19200);
while (1) {
if ((c = serAgetc()) != -1) {
serAputc(c);
}
}
serAclose()
}
Dynamic C Functions | << Previous | Next >> | rabbit.com |