> ----------
> From: Glynn Clements[SMTP:[EMAIL PROTECTED]]
> Sent: 29. april 1998 11:10
> To: Niels Hald Pedersen
> Cc: [EMAIL PROTECTED]
> Subject: Re: Q: modem control lines
>
>
> Niels Hald Pedersen wrote:
>
> > Now I have a need for toggling the RTS line of the serial port, in
> order
> > to activate a RS422/485 transmitter, either on board with such
> hardware,
> > or on an attached donglelike gadget.
> >
> > The question is thus: how do I set/clear the RTS line from the C
> surface
> > ??
>
> From looking at serial.c, my guess would be to use
>
> ioctl(handle, TIOCMBIS, TIOCM_RTS)
>
> to set it and
>
> ioctl(handle, TIOCMBIC, TIOCM_RTS)
>
> to clear it.
>
Works fine !! Thank You very much !!!
( for completeness:
it appears that ioctl expects an (int *) as third arg though,
and I dont like to take the address of a macro, so I do:
..
int i = TIOCM_RTS;
ioctl( , , &i );
..
)
Again 1000 thanks (I dont know what this list would be without Glynn),
Niels Hald Pedersen
[EMAIL PROTECTED]