Hello,
Hmm I've got a programm showing the status of my Raid-5 with a small device attached to the serial port.
Though serial support is in my kernel (when copying "garbage" to /dev/ttyS0" it "works") my program stopped working.
I'm using the RTS and DTR Lines (high and low) to signal the status of the raid with 2.4 and pre it worked without any problems but now
Maybe someone can help me how to set the RTS/DTR lines high and low with 2.6
Thnx :-) FGordon
This is my code doing the line switching and that worked with all kernels pre 2.6
int Ioctl(int fd, int flag, int *state)
{
int ret;
if ((ret=ioctl(fd, flag, state)) < 0) err_sys("ioctl() error");
return (ret);
}
/* Switch the LEDs on or off */
int setled(enum led whichled, int fd, int onoff, int *ledstate)
{
int bitpat;
int state;
int dummy;
if (whichled == green)
{
bitpat=TIOCM_RTS;
}
else if (whichled == red)
{
bitpat=TIOCM_DTR;
}
else bitpat=(TIOCM_RTS | TIOCM_DTR);
if (onoff) *ledstate |= bitpat;
else *ledstate &= ~bitpat;
dummy = Ioctl(fd, TIOCMSET, ledstate);
dummy = Ioctl(fd, TIOCMGET, &state);
return (*ledstate);
}