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

int HAMLIB_API ser_get_car ( hamlib_port_t p,
int *  state 
)

Get Carrier (CI?) bit.

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

Definition at line 507 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_CAR) == TIOCM_CAR;

  return retcode < 0 ? -RIG_EIO : RIG_OK;
}


Generated by  Doxygen 1.6.0   Back to index