Hi all
When I want a serial port to behave like in DOS, I do something like:
#include <unistd.h>
#include <termios.h>
#include <fcntl.h>
int
main()
{
int handle;
struct termios st;
handle = open( "/dev/ttyS0", O_RDWR, O_NOCTTY );
tcgetattr( handle, &st );
cfmakeraw( &st );
cfsetispeed( &st, B19200 ); //say, 19200 baud
cfsetospeed( &st, B19200 );
tcsetattr( handle, 0, &st );
//use the port
return 0;
}
...which seems to work ok.
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
??
Thanks in advance,
Niels Hald Pedersen,
nhp(at)force.dk
As our server will be down the coming afternoon, please cc to my home
address:
nigu(at)post5.tele.dk