summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
deaaebb)
(otherwise these end up in the API docs)
Remove all @internal markings, only use @private where needed.
29 files changed:
- Mark private functions (SR_PRIV) with /** @private */, so that Doxygen
doesn't include them in the output. Functions that are "static" anyway
- 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.
- 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"
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
#define LOG_PREFIX "bt-bluez"
#define LOG_PREFIX "bt-bluez"
#define CONNECT_BLE_TIMEOUT 20 /* Connect timeout in seconds. */
#define STORE_MAC_REVERSE 1
#define CONNECT_BLE_TIMEOUT 20 /* Connect timeout in seconds. */
#define STORE_MAC_REVERSE 1
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
#define LOG_PREFIX "conv"
#define LOG_PREFIX "conv"
/**
* Convert analog values to logic values by using a fixed threshold.
/**
* Convert analog values to logic values by using a fixed threshold.
/**
* Wrapper around @ref sr_channel_free(), suitable for glib iterators.
/**
* Wrapper around @ref sr_channel_free(), suitable for glib iterators.
*/
SR_PRIV void sr_channel_free_cb(void *p)
{
*/
SR_PRIV void sr_channel_free_cb(void *p)
{
*
* @return #TRUE upon differences or unexpected input, #FALSE otherwise.
*
*
* @return #TRUE upon differences or unexpected input, #FALSE otherwise.
*
*/
SR_PRIV gboolean sr_channels_differ(struct sr_channel *ch1, struct sr_channel *ch2)
{
*/
SR_PRIV gboolean sr_channels_differ(struct sr_channel *ch1, struct sr_channel *ch2)
{
*
* @return #TRUE upon differences or unexpected input, #FALSE otherwise.
*
*
* @return #TRUE upon differences or unexpected input, #FALSE otherwise.
*
*/
SR_PRIV gboolean sr_channel_lists_differ(GSList *l1, GSList *l2)
{
*/
SR_PRIV gboolean sr_channel_lists_differ(GSList *l1, GSList *l2)
{
* without the PC's intervention.
*
* @param[in] serial The serial connection.
* without the PC's intervention.
*
* @param[in] serial The serial connection.
*/
SR_PRIV int sr_asycii_packet_request(struct sr_serial_dev_inst *serial)
{
*/
SR_PRIV int sr_asycii_packet_request(struct sr_serial_dev_inst *serial)
{
*
* EEVblog 121GW 19-bytes binary protocol parser.
*
*
* EEVblog 121GW 19-bytes binary protocol parser.
*
* 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
* 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.
*
*
* Metex 14-bytes ASCII protocol parser.
*
* This should work for various multimeters which use this kind of protocol,
* even though there is some variation in which modes each DMM supports.
*
* 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[];
SR_PRIV extern const struct sr_dev_driver *sr_driver_list__start[];
SR_PRIV extern const struct sr_dev_driver *sr_driver_list__stop[];
* Initialize the driver list in a fresh libsigrok context.
*
* @param ctx Pointer to a libsigrok context struct. Must not be NULL.
* Initialize the driver list in a fresh libsigrok context.
*
* @param ctx Pointer to a libsigrok context struct. Must not be NULL.
*/
SR_API void sr_drivers_init(struct sr_context *ctx)
{
*/
SR_API void sr_drivers_init(struct sr_context *ctx)
{
#define LOG_PREFIX "input"
/** @endcond */
#define LOG_PREFIX "input"
/** @endcond */
#define CHUNK_SIZE (4 * 1024 * 1024)
#define CHUNK_SIZE (4 * 1024 * 1024)
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;
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;
static const struct sr_input_module *input_module_list[] = {
&input_binary,
static const struct sr_input_module *input_module_list[] = {
&input_binary,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/**
- * @file
- *
- * @internal
- */
-
#ifndef LIBSIGROK_LIBSIGROK_INTERNAL_H
#define LIBSIGROK_LIBSIGROK_INTERNAL_H
#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;
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;
static const struct sr_output_module *output_module_list[] = {
&output_ascii,
static const struct sr_output_module *output_module_list[] = {
&output_ascii,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file
- * @internal
- */
-
#ifndef LIBSIGROK_SCPI_H
#define LIBSIGROK_SCPI_H
#ifndef LIBSIGROK_SCPI_H
#define LIBSIGROK_SCPI_H
* @retval SR_OK Successful registration.
*
* Callbacks get unregistered by specifying #NULL for the 'cb' parameter.
* @retval SR_OK Successful registration.
*
* Callbacks get unregistered by specifying #NULL for the 'cb' parameter.
*/
SR_PRIV int serial_set_read_chunk_cb(struct sr_serial_dev_inst *serial,
serial_rx_chunk_callback cb, void *cb_data)
*/
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.
*
*
* @param[in] serial Previously opened serial port instance.
*
*/
SR_PRIV void sr_ser_discard_queued_data(struct sr_serial_dev_inst *serial)
{
*/
SR_PRIV void sr_ser_discard_queued_data(struct sr_serial_dev_inst *serial)
{
*
* @param[in] serial Previously opened serial port instance.
*
*
* @param[in] serial Previously opened serial port instance.
*
*/
SR_PRIV size_t sr_ser_has_queued_data(struct sr_serial_dev_inst *serial)
{
*/
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.
*
* @param[in] data Pointer to data bytes to queue.
* @param[in] len Number of data bytes to queue.
*
*/
SR_PRIV void sr_ser_queue_rx_data(struct sr_serial_dev_inst *serial,
const uint8_t *data, size_t len)
*/
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.
*
* @param[out] data Pointer to store retrieved data bytes into.
* @param[in] len Number of data bytes to retrieve.
*
*/
SR_PRIV size_t sr_ser_unqueue_rx_data(struct sr_serial_dev_inst *serial,
uint8_t *data, size_t len)
*/
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.
*
* Returns 0 if no receive data is available, or if the amount of
* available receive data cannot get determined.
*/
SR_PRIV size_t serial_has_receive_data(struct sr_serial_dev_inst *serial)
{
*/
SR_PRIV size_t serial_has_receive_data(struct sr_serial_dev_inst *serial)
{
#include <string.h>
#include <memory.h>
#include <string.h>
#include <memory.h>
#define LOG_PREFIX "serial-bt"
#define LOG_PREFIX "serial-bt"
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_BLUETOOTH
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_BLUETOOTH
*
* @return 0 upon success, non-zero upon failure.
*
*
* @return 0 upon success, non-zero upon failure.
*
* 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
* 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
#include <windows.h> /* for HANDLE */
#endif
#define LOG_PREFIX "serial-hid"
#define LOG_PREFIX "serial-hid"
* @return 0 upon success, non-zero upon failure. Fills the *_ref output
* values.
*
* @return 0 upon success, non-zero upon failure. Fills the *_ref output
* values.
*
* Summary of parsing rules as they are implemented:
* - Insist on the "hid" prefix. Accept "hid" alone without any other
* additional field.
* 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.
*
* @retval SR_OK upon success
* @retval SR_ERR_* upon failure.
*
* 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.
* 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>
#include "serial_hid.h"
#include <string.h>
#define LOG_PREFIX "serial-bu86x"
#define LOG_PREFIX "serial-bu86x"
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#include "serial_hid.h"
#include <string.h>
#include "serial_hid.h"
#include <string.h>
#define LOG_PREFIX "serial-ch9325"
#define LOG_PREFIX "serial-ch9325"
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#include "serial_hid.h"
#include <string.h>
#include "serial_hid.h"
#include <string.h>
#define LOG_PREFIX "serial-cp2110"
#define LOG_PREFIX "serial-cp2110"
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#include "serial_hid.h"
#include <string.h>
#include "serial_hid.h"
#include <string.h>
#define LOG_PREFIX "serial-victor"
#define LOG_PREFIX "serial-victor"
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#ifdef HAVE_SERIAL_COMM
#ifdef HAVE_LIBHIDAPI
#include <windows.h> /* for HANDLE */
#endif
#include <windows.h> /* for HANDLE */
#endif
#define LOG_PREFIX "serial-libsp"
#define LOG_PREFIX "serial-libsp"
#ifdef G_OS_WIN32
typedef HANDLE event_handle;
#else
typedef int event_handle;
#endif
#ifdef G_OS_WIN32
typedef HANDLE event_handle;
#else
typedef int event_handle;
#endif
static int sr_ser_libsp_source_add_int(struct sr_serial_dev_inst *serial,
int events,
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
/** Custom GLib event source for generic descriptor I/O.
* @see https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html
*/
struct fd_source {
GSource base;
*/
struct fd_source {
GSource base;
extern SR_PRIV struct sr_dev_driver session_driver;
extern SR_PRIV struct sr_dev_driver session_driver;
static int session_driver_initialized = 0;
#if !HAVE_ZIP_DISCARD
static int session_driver_initialized = 0;
#if !HAVE_ZIP_DISCARD
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
#define LOG_PREFIX "soft-trigger"
#define LOG_PREFIX "soft-trigger"
SR_PRIV int logic_channel_unitsize(GSList *channels)
{
SR_PRIV int logic_channel_unitsize(GSList *channels)
{
* @file
*
* Standard API helper functions.
* @file
*
* Standard API helper functions.
*/
/* Needed for gettimeofday(), at least on FreeBSD. */
*/
/* Needed for gettimeofday(), at least on FreeBSD. */
*/
/* Needed for POSIX.1-2008 locale functions */
*/
/* Needed for POSIX.1-2008 locale functions */
#define _XOPEN_SOURCE 700
#define _XOPEN_SOURCE 700
#include <config.h>
#include <ctype.h>
#include <locale.h>
#include <config.h>
#include <ctype.h>
#include <locale.h>
* 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
* 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.
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
*/
SR_PRIV int sr_atol(const char *str, long *ret)
{
*/
SR_PRIV int sr_atol(const char *str, long *ret)
{
* 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
* 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.
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
*/
SR_PRIV int sr_atoi(const char *str, int *ret)
{
*/
SR_PRIV int sr_atoi(const char *str, int *ret)
{
* 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
* 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.
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
*/
SR_PRIV int sr_atod(const char *str, double *ret)
{
*/
SR_PRIV int sr_atod(const char *str, double *ret)
{
* 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
* 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.
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
*/
SR_PRIV int sr_atof(const char *str, float *ret)
{
*/
SR_PRIV int sr_atof(const char *str, float *ret)
{
* 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
* 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.
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
*/
SR_PRIV int sr_atod_ascii(const char *str, double *ret)
{
*/
SR_PRIV int sr_atod_ascii(const char *str, double *ret)
{
* 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
* 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.
*
* @retval SR_OK Conversion successful.
* @retval SR_ERR Failure.
*/
SR_PRIV int sr_atof_ascii(const char *str, float *ret)
{
*/
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.
* @param[in] len Number of bytes to print.
*
* @return #NULL upon error, newly allocated GString pointer otherwise.
*/
SR_PRIV GString *sr_hexdump_new(const uint8_t *data, const size_t len)
{
*/
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.
* Free a hex dump text that was created by @ref sr_hexdump_new().
*
* @param[in] s Pointer to the GString to release.
*/
SR_PRIV void sr_hexdump_free(GString *s)
{
*/
SR_PRIV void sr_hexdump_free(GString *s)
{
/**
* @file
* Software limits helper functions
/**
* @file
* Software limits helper functions
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;
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;
static const struct sr_transform_module *transform_module_list[] = {
&transform_nop,
static const struct sr_transform_module *transform_module_list[] = {
&transform_nop,
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
#define LOG_PREFIX "trigger"
#define LOG_PREFIX "trigger"
#endif
/** Custom GLib event source for libusb I/O.
#endif
/** Custom GLib event source for libusb I/O.
*/
struct usb_source {
GSource base;
*/
struct usb_source {
GSource base;