| Simon Elliott 2005-08-01, 8:30 am |
| On 01/08/2005, Floyd L. Davidson wrote:
> However, O_NONBLOCK is defined by POSIX and will be the same on
> all platforms while O_NDELAY has slight variations between some
> platforms. Hence O_NONBLOCK is preferred for portability.
I want to use POSIX as much as possible. Unfortunately it seems that
there's no POSIX way of switching CTS/RTS flow control on or off.
>
> In a C program the way to set or clear the CLOCAL flag is with
> termios. However, you cannot guarantee the state of the serial
> port before you open it; therefore the only correct way to do
> so is with the O_NONBLOCK flag set in open(). After it is open
> the CLOCAL flag can be set as desired, and blocking can be set
> as desired with fcntl().
Thanks, understood now.
--
Simon Elliott http://www.ctsn.co.uk
|