From: Philip Trickett (philipt at domain informatic.ie)
Date: Tue 20 Apr 1999 - 16:34:43 IST
Hi, Just a quick question.
I am trying to use the serial port to access a device, and the device is
designed to draw power from the RTS and DTR lines.
In my program I assert them with the syntax:
/* Assert RTS for +ve supply, clear DTR for Negative */
par = TIOCM_RTS; ioctl (fd, TIOCMBIS, &par);
par = TIOCM_DTR; ioctl (fd, TIOCMBIC, &par);
tcsetattr(pico_portFD, TCSANOW, &new_pico_termios);
opened = TRUE;
If I compile and run this, the bits will only get set properly after I use the pre-written driver software in windows, and then reboot.
Could someone tell me whether this is the correct way to implement these features.
I presume the ioctl takes effect immediately, or does it only take effect when tcsetattr() is called?
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:04:08 GMT