|
It's quite simple. I think the code will explain it the best.
/***************************/ #include <termios.h> int status ;
ioctl (fd,TIOCMGET,&status) ; // fd - already opened device.
if (status & TIOCM_DTR)
printf ("DTR is asserted\n"); // for example
/*****************************/ Info about '#defines' for modem signals in /usr/src/linux/include/asm/termios.h Best regards.
|