Serial port RTS control

QNX 4.25, Watcom 10

Due to a “board feature” I need to disable the RTS signal to enable the
serial port transmitter (hardware handshaking is not used and is disabled.)
Can I control the signal via tcgetattr()/tcsetattr()? If so, how?

Alternately, if I know the base address of the port, I can force the proper
state. I know stty reports the base address but how does it get that
information (tcgetattr?)

Thanks in advance,
Curt

Curt Stienstra <curt.stienstra.nospam@bepco.com> wrote:

QNX 4.25, Watcom 10

Due to a “board feature” I need to disable the RTS signal to enable the
serial port transmitter (hardware handshaking is not used and is disabled.)
Can I control the signal via tcgetattr()/tcsetattr()? If so, how?

Yup, this is tcsetattr/tcgetattr() stuff. You want to look at the
termios.cflag structure, clearing the IHFLOW and OHFLOW bits.

If you need to actually toggle the state of the line, tcflow() can
be used.

Advanced Programming in the Unix Evironment by W. Richard Stevens
(ISBN 0-201-56317-7) has a good chapter on terminal io. (And is a good
book on Unix programming in general. I refer to mine often.)

Alternately, if I know the base address of the port, I can force the proper
state. I know stty reports the base address but how does it get that
information (tcgetattr?)

Use qnx_ioctl() at this lower level (look at sys/qioctl.h for bit patterns).

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.