[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 03352f298f8a7e3ca8826
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Nate B. <n0...@us...> - 2021-05-19 03:52:59
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 03352f298f8a7e3ca882668840f8fb11f1fd49f7 (commit) via 81e93480c4768ad2b21dc28a916e61562947f80b (commit) via a29c298deba571ff45c2923b2187a87b75c1f45e (commit) via b1e84abdedc05cb3e02724a4ecb07723239b4352 (commit) from 4b8a12a8c53bd2c94f1f77655b1760669c9bc299 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 03352f298f8a7e3ca882668840f8fb11f1fd49f7 Merge: 4b8a12a8 81e93480 Author: Nate Bargmann <n0...@n0...> Date: Tue May 18 22:52:08 2021 -0500 Merge pull request #706 from N0NB/doxygen_work Doxygen work commit 81e93480c4768ad2b21dc28a916e61562947f80b Author: Nate Bargmann <n0...@n0...> Date: Tue May 18 22:42:17 2021 -0500 Update Doxygen comments diff --git a/src/cm108.c b/src/cm108.c index 2de83c94..9c942edf 100644 --- a/src/cm108.c +++ b/src/cm108.c @@ -26,8 +26,11 @@ */ /** - * \brief CM108 GPIO * \file cm108.c + * \brief CM108 GPIO support. + * + * CM108 Audio chips found on many USB audio interfaces have controllable + * General Purpose Input/Output pins. */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -73,9 +76,15 @@ /** - * \brief Open CM108 HID port (/dev/hidrawX) - * \param port - * \return file descriptor + * \brief Open CM108 HID port (/dev/hidraw<i>X</i>). + * + * \param port The port structure. + * + * \return File descriptor, otherwise a **negative value** if an error + * occurred (in which case, cause is set appropriately). + * + * \retval RIG_EINVAL The port pathname is empty or no CM108 device detected. + * \retval RIG_EIO The `open`(2) system call returned a **negative value**. */ int cm108_open(hamlib_port_t *port) { @@ -144,8 +153,14 @@ int cm108_open(hamlib_port_t *port) /** - * \brief Close CM108 HID port - * \param port + * \brief Close a CM108 HID port. + * + * \param port The port structure + * + * \return Zero if the port was closed successfully, otherwise -1 if an error + * occurred (in which case, the system `errno`(3) is set appropriately). + * + * \sa The `close`(2) system call. */ int cm108_close(hamlib_port_t *port) { @@ -156,10 +171,18 @@ int cm108_close(hamlib_port_t *port) /** - * \brief Set or unset Push to talk bit on CM108 GPIO - * \param p - * \param pttx RIG_PTT_ON --> Set PTT - * \return RIG_OK or < 0 error + * \brief Set or unset the Push To Talk bit on a CM108 GPIO. + * + * \param p The port structure. + * \param pttx RIG_PTT_ON --> Set PTT, else unset PTT. + * + * \return RIG_OK on success, otherwise a **negative value** if an error + * occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK Setting or unsetting the PTT was successful. + * \retval RIG_EINVAL The file descriptor is invalid or the PTT type is + * unsupported. + * \retval RIG_EIO The `write`(2) system call returned a **negative value**. */ int cm108_ptt_set(hamlib_port_t *p, ptt_t pttx) { @@ -232,10 +255,17 @@ int cm108_ptt_set(hamlib_port_t *p, ptt_t pttx) /** - * \brief Get state of Push to Talk from CM108 GPIO - * \param p - * \param pttx return value (must be non NULL) - * \return RIG_OK or < 0 error + * \brief Get the state of Push To Talk from a CM108 GPIO. + * + * \param p The port structure. + * \param pttx Return value (must be non NULL). + * + * \return RIG_OK on success, otherwise a **negative value** if an error + * occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK Getting the PTT state was successful. + * \retval RIG_ENIMPL Getting the state is not yet implemented. + * \retval RIG_ENAVAIL Getting the state is not available for this PTT type. */ int cm108_ptt_get(hamlib_port_t *p, ptt_t *pttx) { @@ -259,6 +289,7 @@ int cm108_ptt_get(hamlib_port_t *p, ptt_t *pttx) return RIG_OK; } + #ifdef XXREMOVEXX // Not referenced anywhere /** commit a29c298deba571ff45c2923b2187a87b75c1f45e Author: Nate Bargmann <n0...@n0...> Date: Tue May 18 19:00:00 2021 -0500 Update Doxygen comments diff --git a/src/cal.c b/src/cal.c index f9ba6912..8abd75a7 100644 --- a/src/cal.c +++ b/src/cal.c @@ -27,7 +27,7 @@ /** * \file cal.c - * \brief Calibration routines + * \brief Calibration routines. */ #ifdef HAVE_CONFIG_H @@ -41,17 +41,24 @@ /** - * \brief Convert raw data to a calibrated integer value, according to table - * \param rawval input value - * \param cal calibration table - * \return calibrated integer value - - * cal_table_t is a data type suited to hold linear calibration - * cal_table_t.size tell the number of plot cal_table_t.table contains + * \brief Convert raw data to a calibrated integer value, according to a + * calibration table. + * + * \param rawval Input value. + * \param cal Calibration table, + * + * cal_table_t is a data type suited to hold linear calibration. + * + * cal_table_t.size is the number of plots cal_table_t.table contains. + * * If a value is below or equal to cal_table_t.table[0].raw, - * rig_raw2val() will return cal_table_t.table[0].val - * If a value is greater or equal to cal_table_t.table[cal_table_t.size-1].raw, - * rig_raw2val() will return cal_table_t.table[cal_table_t.size-1].val + * rig_raw2val() will return cal_table_t.table[0].val. + * + * If a value is greater or equal to + * cal_table_t.table[cal_table_t.size-1].raw, rig_raw2val() will return + * cal_table_t.table[cal_table_t.size-1].val. + * + * \return Calibrated integer value. */ float HAMLIB_API rig_raw2val(int rawval, const cal_table_t *cal) { @@ -111,18 +118,26 @@ float HAMLIB_API rig_raw2val(int rawval, const cal_table_t *cal) return cal->table[i].val - interpolation; } -/** - * \brief Convert raw data to a calibrated floating-point value, according to table - * \param rawval input value - * \param cal calibration table - * \return calibrated floating-point value - * cal_table_float_t is a data type suited to hold linear calibration - * cal_table_float_t.size tell the number of plot cal_table_t.table contains +/** + * \brief Convert raw data to a calibrated floating-point value, according to + * a calibration table. + * + * \param rawval Input value. + * \param cal Calibration table. + * + * cal_table_float_t is a data type suited to hold linear calibration. + * + * cal_table_float_t.size tell the number of plot cal_table_t.table contains. + * * If a value is below or equal to cal_table_float_t.table[0].raw, - * rig_raw2val_float() will return cal_table_float_t.table[0].val - * If a value is greater or equal to cal_table_float_t.table[cal_table_float_t.size-1].raw, - * rig_raw2val_float() will return cal_table_float_t.table[cal_table_float_t.size-1].val + * rig_raw2val_float() will return cal_table_float_t.table[0].val. + * + * If a value is greater or equal to + * cal_table_float_t.table[cal_table_float_t.size-1].raw, rig_raw2val_float() + * will return cal_table_float_t.table[cal_table_float_t.size-1].val. + * + * \return calibrated floating-point value */ float HAMLIB_API rig_raw2val_float(int rawval, const cal_table_float_t *cal) { commit b1e84abdedc05cb3e02724a4ecb07723239b4352 Author: Nate Bargmann <n0...@n0...> Date: Tue May 18 18:59:09 2021 -0500 Add most all files needed to SRCDOCLST diff --git a/doc/Makefile.am b/doc/Makefile.am index 79cdfe15..bcb3e2af 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -5,9 +5,41 @@ dist_man_MANS = man1/ampctl.1 man1/ampctld.1 \ man1/rigswr.1 man1/rotctl.1 man1/rotctld.1 man1/rigctlcom.1 \ man7/hamlib.7 man7/hamlib-primer.7 man7/hamlib-utilities.7 -SRCDOCLST = ../src/rig.c ../src/rotator.c ../src/tones.c ../src/locator.c \ - ../src/event.c ../src/conf.c ../src/mem.c ../src/settings.c +SRCDOCLST = \ + ../include/hamlib/amplifier.h \ + ../include/hamlib/amplist.h \ + ../include/hamlib/rig.h \ + ../include/hamlib/rotator.h \ + ../include/hamlib/rotlist.h \ + ../src/amp_conf.c \ + ../src/amp_settings.c \ + ../src/amplifier.c \ + ../src/cal.c \ + ../src/cm108.c \ + ../src/conf.c \ + ../src/debug.c \ + ../src/event.c \ + ../src/ext.c \ + ../src/extamp.c \ + ../src/locator.c \ + ../src/mem.c \ + ../src/misc.c \ + ../src/network.c \ + ../src/parallel.c \ + ../src/rig.c \ + ../src/rot_conf.c \ + ../src/rot_ext.c \ + ../src/rot_settings.c \ + ../src/rotator.c \ + ../src/tones.c \ + ../src/serial.c \ + ../src/settings.c \ + ../src/sleep.c \ + ../src/token.h \ + ../src/tones.c \ + ../src/usb_port.c +# Just the file names, the paths are assigned below. SCRIPTSLST = build-w32.sh build-w64.sh ----------------------------------------------------------------------- Summary of changes: doc/Makefile.am | 36 +++++++++++++++++++++++++++++++++-- src/cal.c | 57 +++++++++++++++++++++++++++++++++++-------------------- src/cm108.c | 59 +++++++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 115 insertions(+), 37 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |