* \brief Reset the amplifier. * * \param amp The #AMP handle. * \param reset The reset operation to perform. * * Perform a reset of the amplifier. * * \return RIG_OK if the operation has been successful, otherwise a **negative * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The reset command was successful. * \retval -RIG_EINVAL \a amp is N
| 607 | * \retval -RIG_ENAVAIL amp_caps#reset() capability is not available. |
| 608 | */ |
| 609 | int HAMLIB_API amp_reset(AMP *amp, amp_reset_t reset) |
| 610 | { |
| 611 | const struct amp_caps *caps; |
| 612 | |
| 613 | amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); |
| 614 | |
| 615 | if (CHECK_AMP_ARG(amp)) |
| 616 | { |
| 617 | return -RIG_EINVAL; |
| 618 | } |
| 619 | |
| 620 | caps = amp->caps; |
| 621 | |
| 622 | if (caps->reset == NULL) |
| 623 | { |
| 624 | return -RIG_ENAVAIL; |
| 625 | } |
| 626 | |
| 627 | return caps->reset(amp, reset); |
| 628 | } |
| 629 | |
| 630 | |
| 631 | /** |
no test coverage detected