Doxygen fixes: Hide private stuff, document some structs.

This commit is contained in:
Uwe Hermann 2013-12-27 16:18:28 +01:00
parent 00f24b9fd8
commit df823ac444
4 changed files with 22 additions and 3 deletions

View File

@ -98,7 +98,7 @@ extern struct sr_session *session;
* struct sr_context *sr_ctx; * struct sr_context *sr_ctx;
* *
* if ((ret = sr_init(&sr_ctx)) != SR_OK) { * 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)); * sr_strerror_name(ret), sr_strerror(ret));
* return 1; * return 1;
* } * }
@ -106,7 +106,7 @@ extern struct sr_session *session;
* // Use libsigrok functions here... * // Use libsigrok functions here...
* *
* if ((ret = sr_exit(sr_ctx)) != SR_OK) { * 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)); * sr_strerror_name(ret), sr_strerror(ret));
* return 1; * return 1;
* } * }

View File

@ -380,6 +380,7 @@ SR_PRIV void sr_serial_dev_inst_free(struct sr_serial_dev_inst *serial)
} }
#endif #endif
/** @private */
SR_PRIV struct sr_usbtmc_dev_inst *sr_usbtmc_dev_inst_new(const char *device) SR_PRIV struct sr_usbtmc_dev_inst *sr_usbtmc_dev_inst_new(const char *device)
{ {
struct sr_usbtmc_dev_inst *usbtmc; 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; return usbtmc;
} }
/** @private */
SR_PRIV void sr_usbtmc_dev_inst_free(struct sr_usbtmc_dev_inst *usbtmc) SR_PRIV void sr_usbtmc_dev_inst_free(struct sr_usbtmc_dev_inst *usbtmc)
{ {
g_free(usbtmc->device); g_free(usbtmc->device);

View File

@ -303,7 +303,14 @@ enum {
SR_MQFLAG_AVG = 0x40000, 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; struct sr_context;
/** Packet in a sigrok data feed. */ /** 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 * Opaque data structure representing a libsigrok session. None of the fields
* of this structure are meant to be accessed directly. * of this structure are meant to be accessed directly.
*/ */

View File

@ -42,6 +42,8 @@
*/ */
/** /**
* @private
*
* Convert a string representation of a numeric value to a long integer. The * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * a valid float. The function sets errno according to the details of the