From: Uwe Hermann Date: Fri, 27 Dec 2013 15:18:28 +0000 (+0100) Subject: Doxygen fixes: Hide private stuff, document some structs. X-Git-Tag: libsigrok-0.3.0~398 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=df823ac4445ed6f708136e208c8b8bd4930f4a9e;p=libsigrok.git Doxygen fixes: Hide private stuff, document some structs. --- diff --git a/backend.c b/backend.c index 4e657ac5..0ed16a58 100644 --- a/backend.c +++ b/backend.c @@ -98,7 +98,7 @@ extern struct sr_session *session; * struct sr_context *sr_ctx; * * if ((ret = sr_init(&sr_ctx)) != SR_OK) { - * printf("Error initializing libsigrok (%s): %s.", + * printf("Error initializing libsigrok (%s): %s.\n", * sr_strerror_name(ret), sr_strerror(ret)); * return 1; * } @@ -106,7 +106,7 @@ extern struct sr_session *session; * // Use libsigrok functions here... * * if ((ret = sr_exit(sr_ctx)) != SR_OK) { - * printf("Error shutting down libsigrok (%s): %s.", + * printf("Error shutting down libsigrok (%s): %s.\n", * sr_strerror_name(ret), sr_strerror(ret)); * return 1; * } diff --git a/device.c b/device.c index 87031a9a..1fe2e5fc 100644 --- a/device.c +++ b/device.c @@ -380,6 +380,7 @@ SR_PRIV void sr_serial_dev_inst_free(struct sr_serial_dev_inst *serial) } #endif +/** @private */ SR_PRIV struct sr_usbtmc_dev_inst *sr_usbtmc_dev_inst_new(const char *device) { struct sr_usbtmc_dev_inst *usbtmc; @@ -400,6 +401,7 @@ SR_PRIV struct sr_usbtmc_dev_inst *sr_usbtmc_dev_inst_new(const char *device) return usbtmc; } +/** @private */ SR_PRIV void sr_usbtmc_dev_inst_free(struct sr_usbtmc_dev_inst *usbtmc) { g_free(usbtmc->device); diff --git a/libsigrok.h b/libsigrok.h index f546183e..6e024352 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -303,7 +303,14 @@ enum { SR_MQFLAG_AVG = 0x40000, }; -/** sigrok context (opaque). @see sr_init(), sr_exit(). */ +/** + * @struct sr_context + * Opaque structure representing a libsigrok context. + * + * None of the fields of this structure are meant to be accessed directly. + * + * @see sr_init(), sr_exit(). + */ struct sr_context; /** Packet in a sigrok data feed. */ @@ -948,6 +955,8 @@ struct sr_dev_driver { }; /** + * @struct sr_session + * * Opaque data structure representing a libsigrok session. None of the fields * of this structure are meant to be accessed directly. */ diff --git a/strutil.c b/strutil.c index 40ffc4dc..acd00327 100644 --- a/strutil.c +++ b/strutil.c @@ -42,6 +42,8 @@ */ /** + * @private + * * Convert a string representation of a numeric value to a long integer. The * conversion is strict and will fail if the complete string does not represent * a valid long integer. The function sets errno according to the details of the @@ -73,6 +75,8 @@ SR_PRIV int sr_atol(const char *str, long *ret) } /** + * @private + * * Convert a string representation of a numeric value to an integer. The * conversion is strict and will fail if the complete string does not represent * a valid integer. The function sets errno according to the details of the @@ -102,6 +106,8 @@ SR_PRIV int sr_atoi(const char *str, int *ret) } /** + * @private + * * Convert a string representation of a numeric value to a double. The * conversion is strict and will fail if the complete string does not represent * a valid double. The function sets errno according to the details of the @@ -133,6 +139,8 @@ SR_PRIV int sr_atod(const char *str, double *ret) } /** + * @private + * * Convert a string representation of a numeric value to a float. The * conversion is strict and will fail if the complete string does not represent * a valid float. The function sets errno according to the details of the