* \brief Query the operating frequency of the amplifier. * * \param amp The #AMP handle. * \param freq The variable to store the operating frequency. * * Retrieves the operating frequency from the amplifier. * * \return RIG_OK if the operation was successful, otherwise a **negative * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query wa
| 646 | * \sa amp_set_freq() |
| 647 | */ |
| 648 | int HAMLIB_API amp_get_freq(AMP *amp, freq_t *freq) |
| 649 | { |
| 650 | const struct amp_caps *caps; |
| 651 | |
| 652 | amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); |
| 653 | |
| 654 | if (CHECK_AMP_ARG(amp)) |
| 655 | { |
| 656 | return -RIG_EINVAL; |
| 657 | } |
| 658 | |
| 659 | caps = amp->caps; |
| 660 | |
| 661 | if (caps->get_freq == NULL) |
| 662 | { |
| 663 | return -RIG_ENAVAIL; |
| 664 | } |
| 665 | |
| 666 | return caps->get_freq(amp, freq); |
| 667 | } |
| 668 | |
| 669 | |
| 670 | /** |
no outgoing calls
no test coverage detected