<< Previous | Next >>

serXgetError

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

Description

Returns a byte of error flags, with bits set for any errors that occurred since the last time this function was called. Any bits set will be automatically cleared when this function is called, so a particular error will only be reported once. This function is non-reentrant.

The flags are checked with bitmasks to determine which errors occurred. Error bitmasks:

  • SER_PARITY_ERROR

  • SER_OVERRUN_ERROR

The functions serEgetError() and serFgetError() 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: serXgetError(int port), where "port" is one of the macros SER_PORT_A through SER_PORT_F.

Return value

The error flags byte.

Library

RS232.LIB


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