- Mark private functions (SR_PRIV) with /** @private */, so that Doxygen
doesn't include them in the output. Functions that are "static" anyway
- don't need to be marked like this.
+ don't need to be marked like this. Functions in non-public files that
+ are explicitly excluded in Doxyfile don't need to be marked either.
+ Don't use @internal, always use @private instead.
- Mark private variables/#defines with /** @cond PRIVATE */ and
/** @endcond */, so that Doxygen doesn't include them in the output.
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
-/** @cond PRIVATE */
#define LOG_PREFIX "bt-bluez"
-/** @endcond */
#define CONNECT_BLE_TIMEOUT 20 /* Connect timeout in seconds. */
#define STORE_MAC_REVERSE 1
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
+/** @cond PRIVATE */
#define LOG_PREFIX "conv"
+/** @endcond */
/**
* Convert analog values to logic values by using a fixed threshold.
/**
* Wrapper around @ref sr_channel_free(), suitable for glib iterators.
+ *
+ * @private
*/
SR_PRIV void sr_channel_free_cb(void *p)
{
*
* @return #TRUE upon differences or unexpected input, #FALSE otherwise.
*
- * @internal
+ * @private
*/
SR_PRIV gboolean sr_channels_differ(struct sr_channel *ch1, struct sr_channel *ch2)
{
*
* @return #TRUE upon differences or unexpected input, #FALSE otherwise.
*
- * @internal
+ * @private
*/
SR_PRIV gboolean sr_channel_lists_differ(GSList *l1, GSList *l2)
{
* without the PC's intervention.
*
* @param[in] serial The serial connection.
- *
- * @private
*/
SR_PRIV int sr_asycii_packet_request(struct sr_serial_dev_inst *serial)
{
*
* EEVblog 121GW 19-bytes binary protocol parser.
*
- * @internal
- *
* Note that this protocol is different from other meters. We need not
* decode the LCD presentation (segments a-g and dot of seven segment
* displays). Neither need we decode a textual presentation consisting
*
* Metex 14-bytes ASCII protocol parser.
*
- * @internal
* This should work for various multimeters which use this kind of protocol,
* even though there is some variation in which modes each DMM supports.
*
SR_PRIV extern const struct sr_dev_driver *sr_driver_list__start[];
SR_PRIV extern const struct sr_dev_driver *sr_driver_list__stop[];
-/** @private
+/**
* Initialize the driver list in a fresh libsigrok context.
*
* @param ctx Pointer to a libsigrok context struct. Must not be NULL.
+ *
+ * @private
*/
SR_API void sr_drivers_init(struct sr_context *ctx)
{
#define LOG_PREFIX "input"
/** @endcond */
+/** @cond PRIVATE */
#define CHUNK_SIZE (4 * 1024 * 1024)
+/** @endcond */
/**
* @file
extern SR_PRIV struct sr_input_module input_raw_analog;
extern SR_PRIV struct sr_input_module input_logicport;
extern SR_PRIV struct sr_input_module input_null;
-/* @endcond */
+/** @endcond */
static const struct sr_input_module *input_module_list[] = {
&input_binary,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/**
- * @file
- *
- * @internal
- */
-
#ifndef LIBSIGROK_LIBSIGROK_INTERNAL_H
#define LIBSIGROK_LIBSIGROK_INTERNAL_H
extern SR_PRIV struct sr_output_module output_wav;
extern SR_PRIV struct sr_output_module output_wavedrom;
extern SR_PRIV struct sr_output_module output_null;
-/* @endcond */
+/** @endcond */
static const struct sr_output_module *output_module_list[] = {
&output_ascii,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file
- * @internal
- */
-
#ifndef LIBSIGROK_SCPI_H
#define LIBSIGROK_SCPI_H
* @retval SR_OK Successful registration.
*
* Callbacks get unregistered by specifying #NULL for the 'cb' parameter.
+ *
+ * @private
*/
SR_PRIV int serial_set_read_chunk_cb(struct sr_serial_dev_inst *serial,
serial_rx_chunk_callback cb, void *cb_data)
*
* @param[in] serial Previously opened serial port instance.
*
- * @internal
+ * @private
*/
SR_PRIV void sr_ser_discard_queued_data(struct sr_serial_dev_inst *serial)
{
*
* @param[in] serial Previously opened serial port instance.
*
- * @internal
+ * @private
*/
SR_PRIV size_t sr_ser_has_queued_data(struct sr_serial_dev_inst *serial)
{
* @param[in] data Pointer to data bytes to queue.
* @param[in] len Number of data bytes to queue.
*
- * @internal
+ * @private
*/
SR_PRIV void sr_ser_queue_rx_data(struct sr_serial_dev_inst *serial,
const uint8_t *data, size_t len)
* @param[out] data Pointer to store retrieved data bytes into.
* @param[in] len Number of data bytes to retrieve.
*
- * @internal
+ * @private
*/
SR_PRIV size_t sr_ser_unqueue_rx_data(struct sr_serial_dev_inst *serial,
uint8_t *data, size_t len)
*
* Returns 0 if no receive data is available, or if the amount of
* available receive data cannot get determined.
+ *
+ * @private
*/
SR_PRIV size_t serial_has_receive_data(struct sr_serial_dev_inst *serial)
{
#include <string.h>
#include <memory.h>
-/** @cond PRIVATE */
#define LOG_PREFIX "serial-bt"
-/** @endcond */
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_BLUETOOTH
*
* @return 0 upon success, non-zero upon failure.
*
- * @internal
- *
* Summary of parsing rules as they are implemented:
* - Implementor's note: Automatic scan for available devices is not
* yet implemented. So strictly speaking some parts of the input
#include <windows.h> /* for HANDLE */
#endif
-/** @cond PRIVATE */
#define LOG_PREFIX "serial-hid"
-/** @endcond */
#ifdef HAVE_SERIAL_COMM
* @return 0 upon success, non-zero upon failure. Fills the *_ref output
* values.
*
- * @internal
- *
* Summary of parsing rules as they are implemented:
* - Insist on the "hid" prefix. Accept "hid" alone without any other
* additional field.
* @retval SR_OK upon success
* @retval SR_ERR_* upon failure.
*
- * @internal
- *
* This routine fills in blanks which the conn= spec parser left open.
* When not specified yet, the HID chip type gets determined. When a
* serial number was specified, then search the corresponding device.
#include "serial_hid.h"
#include <string.h>
-/** @cond PRIVATE */
#define LOG_PREFIX "serial-bu86x"
-/** @endcond */
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#include "serial_hid.h"
#include <string.h>
-/** @cond PRIVATE */
#define LOG_PREFIX "serial-ch9325"
-/** @endcond */
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#include "serial_hid.h"
#include <string.h>
-/** @cond PRIVATE */
#define LOG_PREFIX "serial-cp2110"
-/** @endcond */
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#include "serial_hid.h"
#include <string.h>
-/** @cond PRIVATE */
#define LOG_PREFIX "serial-victor"
-/** @endcond */
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#include <windows.h> /* for HANDLE */
#endif
-/** @cond PRIVATE */
#define LOG_PREFIX "serial-libsp"
-/** @endcond */
/**
* @file
return SR_OK;
}
-/** @cond PRIVATE */
#ifdef G_OS_WIN32
typedef HANDLE event_handle;
#else
typedef int event_handle;
#endif
-/** @endcond */
static int sr_ser_libsp_source_add_int(struct sr_serial_dev_inst *serial,
int events,
/** Custom GLib event source for generic descriptor I/O.
* @see https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html
- * @internal
*/
struct fd_source {
GSource base;
* @{
*/
+/** @cond PRIVATE */
extern SR_PRIV struct sr_dev_driver session_driver;
+/** @endcond */
static int session_driver_initialized = 0;
#if !HAVE_ZIP_DISCARD
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
-/* @cond PRIVATE */
+/** @cond PRIVATE */
#define LOG_PREFIX "soft-trigger"
-/* @endcond */
+/** @endcond */
SR_PRIV int logic_channel_unitsize(GSList *channels)
{
* @file
*
* Standard API helper functions.
- *
- * @internal
*/
/* Needed for gettimeofday(), at least on FreeBSD. */
*/
/* Needed for POSIX.1-2008 locale functions */
+/** @cond PRIVATE */
#define _XOPEN_SOURCE 700
+/** @endcond */
#include <config.h>
#include <ctype.h>
#include <locale.h>
*/
/**
- * @private
- *
* Convert a string representation of a numeric value (base 10) 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
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
+ *
+ * @private
*/
SR_PRIV int sr_atol(const char *str, long *ret)
{
}
/**
- * @private
- *
* Convert a string representation of a numeric value (base 10) 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
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
+ *
+ * @private
*/
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
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
+ *
+ * @private
*/
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
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
+ *
+ * @private
*/
SR_PRIV int sr_atof(const char *str, float *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
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
+ *
+ * @private
*/
SR_PRIV int sr_atod_ascii(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
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
+ *
+ * @private
*/
SR_PRIV int sr_atof_ascii(const char *str, float *ret)
{
* @param[in] len Number of bytes to print.
*
* @return #NULL upon error, newly allocated GString pointer otherwise.
+ *
+ * @private
*/
SR_PRIV GString *sr_hexdump_new(const uint8_t *data, const size_t len)
{
* Free a hex dump text that was created by @ref sr_hexdump_new().
*
* @param[in] s Pointer to the GString to release.
+ *
+ * @private
*/
SR_PRIV void sr_hexdump_free(GString *s)
{
/**
* @file
* Software limits helper functions
- * @internal
*/
#include <config.h>
extern SR_PRIV struct sr_transform_module transform_nop;
extern SR_PRIV struct sr_transform_module transform_scale;
extern SR_PRIV struct sr_transform_module transform_invert;
-/* @endcond */
+/** @endcond */
static const struct sr_transform_module *transform_module_list[] = {
&transform_nop,
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
-/* * @cond PRIVATE */
+/** @cond PRIVATE */
#define LOG_PREFIX "trigger"
-/* * @endcond */
+/** @endcond */
/**
* @file
#endif
/** Custom GLib event source for libusb I/O.
- * @internal
*/
struct usb_source {
GSource base;