From: Gerhard Sittig Date: Mon, 16 Oct 2023 20:12:27 +0000 (+0200) Subject: sw_limits: touch up documentation, address minor style nits X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4856d33ba4d0cdc28d7d28c1e577494e48d7b38b;p=libsigrok.git sw_limits: touch up documentation, address minor style nits Touch up Doxygen comments, add discussion of missing parameters. Group and alpha-sort header files. Break long lines in more useful locations. --- diff --git a/src/sw_limits.c b/src/sw_limits.c index 1a9c4c58..41052d0f 100644 --- a/src/sw_limits.c +++ b/src/sw_limits.c @@ -22,12 +22,14 @@ * Software limits helper functions */ -#include -#include -#include -#include +#include "config.h" + #include #include +#include +#include +#include + #include "libsigrok-internal.h" #define LOG_PREFIX "sw_limits" @@ -55,10 +57,11 @@ SR_PRIV void sr_sw_limits_init(struct sr_sw_limits *limits) * @param limits software limit instance * @param key config item key * @param data config item data + * * @return SR_ERR_NA if @p key is not a supported limit, SR_OK otherwise */ -SR_PRIV int sr_sw_limits_config_get(const struct sr_sw_limits *limits, uint32_t key, - GVariant **data) +SR_PRIV int sr_sw_limits_config_get(const struct sr_sw_limits *limits, + uint32_t key, GVariant **data) { switch (key) { case SR_CONF_LIMIT_SAMPLES: @@ -86,10 +89,11 @@ SR_PRIV int sr_sw_limits_config_get(const struct sr_sw_limits *limits, uint32_t * @param limits software limit instance * @param key config item key * @param data config item data + * * @return SR_ERR_NA if @p key is not a supported limit, SR_OK otherwise */ -SR_PRIV int sr_sw_limits_config_set(struct sr_sw_limits *limits, uint32_t key, - GVariant *data) +SR_PRIV int sr_sw_limits_config_set(struct sr_sw_limits *limits, + uint32_t key, GVariant *data) { switch (key) { case SR_CONF_LIMIT_SAMPLES: @@ -130,6 +134,7 @@ SR_PRIV void sr_sw_limits_acquisition_start(struct sr_sw_limits *limits) * processing has been done. * * @param limits software limits instance + * * @returns TRUE if any of the software limits has been reached and the driver * should stop data acquisition, otherwise FALSE. */ @@ -184,6 +189,7 @@ SR_PRIV gboolean sr_sw_limits_check(struct sr_sw_limits *limits) * @param[out] samples remaining samples count until the limit is reached * @param[out] frames remaining frames count until the limit is reached * @param[out] msecs remaining milliseconds until the limit is reached + * @param[out] exceeded whether configured limits were reached before * * @return SR_ERR_* upon error, SR_OK otherwise */