MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / par_unlock

Function par_unlock

src/parallel.c:581–605  ·  view source on GitHub ↗

* \brief Release lock on Parallel Port * \param port * \return RIG_OK or < 0 */

Source from the content-addressed store, hash-verified

579 * \return RIG_OK or < 0
580 */
581int HAMLIB_API par_unlock(hamlib_port_t *port)
582{
583 rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
584
585#ifdef HAVE_LINUX_PPDEV_H
586
587 if (ioctl(port->fd, PPRELEASE) < 0)
588 {
589 rig_debug(RIG_DEBUG_ERR,
590 "%s: releasing device \"%s\": %s\n",
591 __func__,
592 port->pathname,
593 strerror(errno));
594 return -RIG_EIO;
595 }
596
597 return RIG_OK;
598#elif defined(HAVE_DEV_PPBUS_PPI_H)
599 return RIG_OK;
600#elif defined(__WIN64__) || defined(__WIN32__)
601 return RIG_OK;
602#else
603 return -RIG_ENIMPL;
604#endif
605}
606
607
608#ifndef PARPORT_CONTROL_STROBE

Callers 11

write_latchFunction · 0.85
ad_writeFunction · 0.85
dds60_openFunction · 0.85
setDirectionFunction · 0.85
par_ptt_setFunction · 0.85
par_ptt_getFunction · 0.85
if100_set_positionFunction · 0.85
setDirectionFunction · 0.85
ars_stopFunction · 0.85
ars_moveFunction · 0.85
ars_get_positionFunction · 0.85

Calls 1

rig_debugFunction · 0.85

Tested by

no test coverage detected