From: Uwe Hermann Date: Sun, 21 Oct 2012 14:13:36 +0000 (+0200) Subject: Doxygen: Initial groups and topic short descriptions. X-Git-Tag: dsupstream~641 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7b870c38e3040fec1165a623ae3986e4fb342218;p=libsigrok.git Doxygen: Initial groups and topic short descriptions. --- diff --git a/backend.c b/backend.c index 2d0b38e2..840b1723 100644 --- a/backend.c +++ b/backend.c @@ -59,6 +59,14 @@ * sigrok.org/wiki/Libsigrok */ +/** + * @defgroup grp_init Initialization + * + * Initializing and shutting down libsigrok. + * + * @{ + */ + /** * Initialize libsigrok. * @@ -130,3 +138,5 @@ SR_API int sr_exit(struct sr_context *ctx) return SR_OK; } + +/** @} */ diff --git a/datastore.c b/datastore.c index c4b82e67..a5cdd284 100644 --- a/datastore.c +++ b/datastore.c @@ -24,6 +24,14 @@ #include "libsigrok.h" #include "libsigrok-internal.h" +/** + * @defgroup grp_datastore Datastore + * + * Creating, using, or destroying libsigrok datastores. + * + * @{ + */ + static gpointer new_chunk(struct sr_datastore **ds); /** @@ -241,3 +249,5 @@ static gpointer new_chunk(struct sr_datastore **ds) return chunk; /* TODO: SR_OK later? */ } + +/** @} */ diff --git a/device.c b/device.c index d5ad7b2b..d305710c 100644 --- a/device.c +++ b/device.c @@ -22,6 +22,14 @@ #include "libsigrok.h" #include "libsigrok-internal.h" +/** + * @defgroup grp_devices Devices + * + * Device handling in libsigrok. + * + * @{ + */ + /** @private */ SR_PRIV struct sr_probe *sr_probe_new(int index, int type, gboolean enabled, const char *name) @@ -316,3 +324,4 @@ SR_API int sr_dev_inst_clear(const struct sr_dev_driver *driver) return SR_OK; } +/** @} */ diff --git a/error.c b/error.c index d0697bc8..1e33d9ab 100644 --- a/error.c +++ b/error.c @@ -20,6 +20,14 @@ #include "libsigrok.h" +/** + * @defgroup grp_error Error handling + * + * Error handling in libsigrok. + * + * @{ + */ + /** * Return a human-readable error string for the given libsigrok error code. * @@ -108,3 +116,5 @@ SR_API const char *sr_strerror_name(int error_code) return str; } + +/** @} */ diff --git a/filter.c b/filter.c index fc6de634..4e3115cd 100644 --- a/filter.c +++ b/filter.c @@ -23,6 +23,14 @@ #include "libsigrok.h" #include "libsigrok-internal.h" +/** + * @defgroup grp_filter Probe filter + * + * Helper functions to filter out unused probes from samples. + * + * @{ + */ + /** * Remove unused probes from samples. * @@ -142,3 +150,5 @@ SR_API int sr_filter_probes(int in_unitsize, int out_unitsize, return SR_OK; } + +/** @} */ diff --git a/hwdriver.c b/hwdriver.c index 33d716da..207052cf 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -26,6 +26,13 @@ #include "libsigrok.h" #include "libsigrok-internal.h" +/** + * @defgroup grp_driver Hardware drivers + * + * Hardware driver handling in libsigrok. + * + * @{ + */ /* Driver scanning options. */ static struct sr_hwcap_option sr_drvopts[] = { @@ -356,3 +363,5 @@ SR_PRIV int sr_source_add(int fd, int events, int timeout, { return sr_session_source_add(fd, events, timeout, cb, cb_data); } + +/** @} */ diff --git a/input/input.c b/input/input.c index f39dd6d5..1b83c65d 100644 --- a/input/input.c +++ b/input/input.c @@ -20,6 +20,14 @@ #include "libsigrok.h" #include "libsigrok-internal.h" +/** + * @defgroup grp_input Input formats + * + * Input file/data format handling. + * + * @{ + */ + /** @cond PRIVATE */ extern SR_PRIV struct sr_input_format input_chronovu_la8; extern SR_PRIV struct sr_input_format input_binary; @@ -36,3 +44,5 @@ SR_API struct sr_input_format **sr_input_list(void) { return input_module_list; } + +/** @} */ diff --git a/log.c b/log.c index 8cfcf53e..a3b807aa 100644 --- a/log.c +++ b/log.c @@ -29,6 +29,14 @@ * Logging support. */ +/** + * @defgroup grp_logging Logging + * + * Controlling the libsigrok message logging functionality. + * + * @{ + */ + /* Currently selected libsigrok loglevel. Default: SR_LOG_WARN. */ static int sr_loglevel = SR_LOG_WARN; /* Show errors+warnings per default. */ @@ -275,3 +283,5 @@ SR_PRIV int sr_err(const char *format, ...) return ret; } + +/** @} */ diff --git a/output/output.c b/output/output.c index b8f4f642..457a80c3 100644 --- a/output/output.c +++ b/output/output.c @@ -20,6 +20,14 @@ #include "libsigrok.h" #include "libsigrok-internal.h" +/** + * @defgroup grp_output Output formats + * + * Output file/data format handling. + * + * @{ + */ + /** @cond PRIVATE */ extern SR_PRIV struct sr_output_format output_text_bits; extern SR_PRIV struct sr_output_format output_text_hex; @@ -55,3 +63,5 @@ SR_API struct sr_output_format **sr_output_list(void) { return output_module_list; } + +/** @} */ diff --git a/session.c b/session.c index 0c57a87b..5723610f 100644 --- a/session.c +++ b/session.c @@ -25,6 +25,14 @@ #include "libsigrok.h" #include "libsigrok-internal.h" +/** + * @defgroup grp_session Session handling + * + * Creating, using, or destroying libsigrok sessions. + * + * @{ + */ + struct source { int timeout; sr_receive_data_callback_t cb; @@ -652,3 +660,5 @@ SR_API int sr_session_source_remove_channel(GIOChannel *channel) { return _sr_session_source_remove((gintptr)channel); } + +/** @} */ diff --git a/session_file.c b/session_file.c index aae31a00..b9c3ad8b 100644 --- a/session_file.c +++ b/session_file.c @@ -27,6 +27,12 @@ #include "libsigrok.h" #include "libsigrok-internal.h" +/** + * @ingroup grp_device + * + * @{ + */ + extern struct sr_session *session; extern SR_PRIV struct sr_dev_driver session_driver; @@ -289,3 +295,5 @@ SR_API int sr_session_save(const char *filename, return SR_OK; } + +/** @} */ diff --git a/strutil.c b/strutil.c index 0ddeae09..0b0703e5 100644 --- a/strutil.c +++ b/strutil.c @@ -24,6 +24,14 @@ #include "libsigrok.h" #include "libsigrok-internal.h" +/** + * @defgroup grp_strutil String utilities + * + * Helper functions for handling or converting libsigrok-related strings. + * + * @{ + */ + /** * Convert a numeric value value to its "natural" string representation. * in SI units @@ -419,4 +427,4 @@ SR_API int sr_parse_voltage(const char *voltstr, struct sr_rational *r) return SR_OK; } - +/** @} */ diff --git a/version.c b/version.c index be323dc6..37baabec 100644 --- a/version.c +++ b/version.c @@ -20,6 +20,14 @@ #include "libsigrok.h" +/** + * @defgroup grp_versions Versions + * + * Version number querying functions. + * + * @{ + */ + SR_API int sr_package_version_major_get(void) { return SR_PACKAGE_VERSION_MAJOR; @@ -59,3 +67,5 @@ SR_API const char *sr_lib_version_string_get(void) { return SR_LIB_VERSION_STRING; } + +/** @} */