<< Previous | Next >> | |
|
int serCheckParity( char rx_byte, char parity );
Description
- This function is different from the other serial routines in that it does not specify a particular serial port. This function takes any 8-bit character and tests it for correct parity. It will return true if the parity of
rx_byte
matches the parity specified. This function is useful for checking individual characters when using a 7-bit data protocol.Parameters
- rx_byte
- The 8 bit character being tested for parity.
- parity
- The character `O' for odd parity, or the character `E' for even parity.
Return value
1
: Parity of the byte being tested matches the parity supplied as an argument.
0
: Parity of the byte does not match.Library
- RS232.LIB
Dynamic C Functions | << Previous | Next >> | rabbit.com |