Logo Search packages:      
Sourcecode: hamlib version File versions  Download package

int HAMLIB_API ser_get_dtr ( hamlib_port_t p,
int *  state 
)

Get DTR bit.

Parameters:
p supposed to be &rig->state.rigport
state non-NULL

Definition at line 475 of file serial.c.

References hamlib_port_t::fd, RIG_EIO, and RIG_OK.

Referenced by rig_get_ptt().

{
  int retcode;
  unsigned int y;

  retcode = IOCTL(p->fd, TIOCMGET, &y);
  *state = (y & TIOCM_DTR) == TIOCM_DTR;

  return retcode < 0 ? -RIG_EIO : RIG_OK;
}


Generated by  Doxygen 1.6.0   Back to index