[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: RE: RS485 line turnaround
first, you have to enable "RS-485 support" in "Drivers for ETRAX 100LX
built-in interfaces" (e.g. using "make menuconfig").
See the following (hopefully correct) code-snippet for an example of
using this "kernel RS485 mode". I got approximately 120us send/receive
switch time using this.
//Include for ioctl struct
struct rs485_control ctrl485;
ioctl(fd, TIOCSERSETRS485, &ctrl485);
//You can use now ordinary write() to send data, it
//automagically switches to send mode before writing
//an switches back to receive mode after writing (using
//the RTS pin)
Don't Fear The Penguins!