* \brief Set the operating frequency of the amplifier. * * \param amp The #AMP handle. * \param freq The operating frequency. * * Set the operating frequency of the amplifier. Depending on the amplifier * this may simply set the bandpass filters, etc. * * \return RIG_OK if the operation was successful, otherwise a **negative * value** if an error occurred (in which case, cause is set app
| 686 | * \sa amp_get_freq() |
| 687 | */ |
| 688 | int HAMLIB_API amp_set_freq(AMP *amp, freq_t freq) |
| 689 | { |
| 690 | const struct amp_caps *caps; |
| 691 | |
| 692 | amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); |
| 693 | |
| 694 | if (CHECK_AMP_ARG(amp)) |
| 695 | { |
| 696 | return -RIG_EINVAL; |
| 697 | } |
| 698 | |
| 699 | caps = amp->caps; |
| 700 | |
| 701 | if (caps->set_freq == NULL) |
| 702 | { |
| 703 | return -RIG_ENAVAIL; |
| 704 | } |
| 705 | |
| 706 | return caps->set_freq(amp, freq); |
| 707 | } |
| 708 | |
| 709 | |
| 710 | /** |
no outgoing calls
no test coverage detected