From 3edc59dbd2ce7ecd0eb47a6673b73df71fad13a5 Mon Sep 17 00:00:00 2001 From: Wouter van Gulik Date: Thu, 9 Sep 2021 22:36:43 +0200 Subject: [PATCH] Add documentation for rig_get_cache. Note that it misses all sanity check on the input, but at least that is now documented. Made rig_check_rig_caps and twiddling static, they are not exported but Doxygen includes all globally visible function. --- src/rig.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/rig.c b/src/rig.c index 842720f35..a8e3d3391 100644 --- a/src/rig.c +++ b/src/rig.c @@ -329,7 +329,7 @@ void *caps_test_macro_name = &caps_test.macro_name; // check and show WARN if rig_caps structure doesn't match // this tests for shared library incompatibility -int rig_check_rig_caps() +static int rig_check_rig_caps() { int rc = RIG_OK; @@ -1580,6 +1580,25 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq) return RIG_OK; } +/** + * \brief get cached values for a VFO + * \param rig The rig handle + * \param vfo The VFO to get information from + * \param freq The frequency is stored here + * \param cache_ms_freq The age of the last frequency update in ms + * \param mode The mode is stored here + * \param cache_ms_mode The age of the last mode update in ms + * \param width The width is stored here + * \param cache_ms_width The age of the last width update in ms + * + * Use this to query the cache and then determine to actually fetch data from + * the rig. + * + * \note All pointers must be given. No pointer can be left at NULL + * + * \return RIG_OK + * + */ int rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq, rmode_t *mode, int *cache_ms_mode, pbwidth_t *width, int *cache_ms_width) { @@ -1708,7 +1727,7 @@ int rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq, // detect if somebody is twiddling the VFO // indicator is last set freq doesn't match current freq // so we have to query freq every time we set freq or vfo to handle this -int twiddling(RIG *rig) +static int twiddling(RIG *rig) { const struct rig_caps *caps;