Logo Search packages:      
Sourcecode: hamlib version File versions

int HAMLIB_API ser_get_dsr ( hamlib_port_t p,
int *  state 

Get Data Set Ready (DSR) bit.

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

Definition at line 532 of file serial.c.

References hamlib_port_t::fd, RIG_EIO, and RIG_OK.

Referenced by rig_get_dcd().

  int retcode;
  unsigned int y;

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

  return retcode < 0 ? -RIG_EIO : RIG_OK;

Generated by  Doxygen 1.6.0   Back to index