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

Function par_lock

src/parallel.c:549–573  ·  view source on GitHub ↗

* \brief Get a lock on the Parallel Port * \param port * \return RIG_OK or < 0 */

Source from the content-addressed store, hash-verified

547 * \return RIG_OK or < 0
548 */
549int HAMLIB_API par_lock(hamlib_port_t *port)
550{
551 rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
552
553#ifdef HAVE_LINUX_PPDEV_H
554
555 if (ioctl(port->fd, PPCLAIM) < 0)
556 {
557 rig_debug(RIG_DEBUG_ERR,
558 "%s: claiming device \"%s\": %s\n",
559 __func__,
560 port->pathname,
561 strerror(errno));
562 return -RIG_EIO;
563 }
564
565 return RIG_OK;
566#elif defined(HAVE_DEV_PPBUS_PPI_H)
567 return RIG_OK;
568#elif defined(__WIN64__) || defined(__WIN32__)
569 return RIG_OK;
570#else
571 return -RIG_ENIMPL;
572#endif
573}
574
575
576/**

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