User`s manual

64 eDisplay (OP7200)
User interface to set up OP7200 serial communication lines. Call this function after serXOpen().
Whether you are opening one or multiple serial ports, this function must be executed after executing the last
serXOpen function AND before you start using any of the serial ports. This function is non-reentrant.
If Mode 1 or Mode 3 is selected, CTS/RTS flow control is exercised using the serCflowcontrolOn
and
serCflowcontrolOff functions from the RS232.LIB library.
PARAMETER
mode is the defined serial port configuration.
RETURN VALUE
0 if valid mode, 1 if not.
SEE ALSO
ser485Tx, ser485Rx
Enables the RS-485 transmitter. Transmitted data get echo'ed back into the receive data buffer. These
echo'ed data could be used to know when to disable the transmitter by using one of the following
methods:
Byte mode—disable the transmitter after the same byte that is transmitted is detected in the receive
data buffer.
Block data mode—disable the transmitter after the same number of bytes transmitted is detected in the
receive data buffer.
serMode() must be executed before running this function.
SEE ALSO
serMode, ser485Rx
Disables the RS-485 transmitter. This puts the OP7200 in listen mode, which allows it to receive data
from the RS-485 interface.
serMode() must be executed before running this function.
SEE ALSO
serMode, ser485Tx
int serMode(int mode);
Mode
Serial Port
B C D
0 RS-485 RS-232, 3-wire RS-232, 3-wire
1 RS-485 RS-232, 5-wire CTS/RTS
2
not initialized
*
* Use modes 2 and 3 when Serial Port B is going to used by other libraries
such as PACKET.LIB.
RS-232, 3-wire RS-232, 3-wire
3
not initialized
*
RS-232, 5-wire CTS/RTS
void ser485Tx(void);
void ser485Rx(void);