> How can I set the DTR line of the serial port with Linux?

#include <sys/ioctl.h>
#include <unistd.h>

bool setDTR(int fd)
{
    int ioflags;

    if(ioctl(fd, TIOCMGET, &ioflags) < 0)
        return false;

    /* Set DTR on */
    ioflags |= TIOCM_DTR;

    return ioctl(fd, TIOCMSET, &ioflags) >= 0;
}

Carlos
[EMAIL PROTECTED]


Reply via email to