* \brief Release lock on Parallel Port * \param port * \return RIG_OK or < 0 */
| 579 | * \return RIG_OK or < 0 |
| 580 | */ |
| 581 | int 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 |
no test coverage detected