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

int HAMLIB_API par_unlock ( hamlib_port_t port  ) 

Release lock on Parallel Port.

Parameters:
port 
Returns:
RIG_OK or < 0

Definition at line 350 of file parallel.c.

References hamlib_port_t::fd, hamlib_port_t::pathname, rig_debug(), RIG_DEBUG_ERR, RIG_EIO, RIG_ENIMPL, and RIG_OK.

Referenced by microtune_eval_board::board_present_p().

{
#ifdef HAVE_LINUX_PPDEV_H
      if (ioctl(port->fd, PPRELEASE) < 0) {
            rig_debug(RIG_DEBUG_ERR, "Releasing device \"%s\": %s\n", port->pathname, strerror(errno));
            return -RIG_EIO;
      }
      return RIG_OK;
#elif defined(HAVE_DEV_PPBUS_PPI_H)
#elif defined(WIN32)
      return RIG_OK;
#endif
      return -RIG_ENIMPL;
}


Generated by  Doxygen 1.6.0   Back to index