s/DRIVER_LOG_DOMAIN/LOG_PREFIX/.

This is more correct anyway, and also a bit shorter and more readable.
This commit is contained in:
Uwe Hermann 2013-05-03 21:59:32 +02:00
parent 06c45a66f7
commit 29a27196a1
71 changed files with 460 additions and 460 deletions

View File

@ -23,14 +23,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "device: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "device: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/**
* @file

View File

@ -24,14 +24,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "filter: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "filter: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/**
* @file

View File

@ -21,14 +21,14 @@
#ifndef LIBSIGROK_AGILENT_DMM_H
#define LIBSIGROK_AGILENT_DMM_H
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "agilent-dmm: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "agilent-dmm: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define AGDMM_BUFSIZE 256

View File

@ -91,7 +91,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -298,7 +298,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data
devc->cb_data = cb_data;
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Poll every 100ms, or whenever some data comes in. */
serial = sdi->conn;
@ -310,7 +310,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, hw_dev_close,
sdi->conn, DRIVER_LOG_DOMAIN);
sdi->conn, LOG_PREFIX);
}
SR_PRIV struct sr_dev_driver agdmm_driver_info = {

View File

@ -51,7 +51,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -291,7 +291,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
}
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Poll every 10ms, or whenever some data comes in. */
sr_source_add(devc->ufds[0].fd, devc->ufds[0].events, 10,

View File

@ -28,14 +28,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "alsa: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "alsa: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/** Private, per-device-instance driver context. */
struct dev_context {

View File

@ -410,7 +410,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -1363,7 +1363,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->cb_data = cb_data;
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Add capture source. */
sr_source_add(0, G_IO_IN, 10, receive_data, (void *)sdi);

View File

@ -22,14 +22,14 @@
#ifndef LIBSIGROK_HARDWARE_ASIX_SIGMA_ASIX_SIGMA_H
#define LIBSIGROK_HARDWARE_ASIX_SIGMA_ASIX_SIGMA_H
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "asix-sigma: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "asix-sigma: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
enum sigma_write_register {
WRITE_CLOCK_SELECT = 0,

View File

@ -36,7 +36,7 @@ static struct sr_dev_driver *di = &brymen_bm857_driver_info;
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static void free_instance(void *inst)
@ -277,7 +277,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->starttime = g_get_monotonic_time();
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Poll every 50ms, or whenever some data comes in. */
serial = sdi->conn;
@ -290,7 +290,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, hw_dev_close,
sdi->conn, DRIVER_LOG_DOMAIN);
sdi->conn, LOG_PREFIX);
}
SR_PRIV struct sr_dev_driver brymen_bm857_driver_info = {

View File

@ -28,14 +28,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "brymen-dmm: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "brymen-dmm: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define DMM_BUFSIZE 256

View File

@ -86,7 +86,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -482,7 +482,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->cb_data = cb_data;
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Time when we should be done (for detecting trigger timeouts). */
devc->done = (devc->divcount + 1) * 0.08388608 + time(NULL)

View File

@ -27,14 +27,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "la8: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "la8: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define USB_VENDOR_ID 0x0403
#define USB_DESCRIPTION "ChronoVu LA8"

View File

@ -74,7 +74,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -244,7 +244,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->cb_data = cb_data;
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Poll every 150ms, or whenever some data comes in. */
serial = sdi->conn;
@ -257,7 +257,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, hw_dev_close,
sdi->conn, DRIVER_LOG_DOMAIN);
sdi->conn, LOG_PREFIX);
}
SR_PRIV struct sr_dev_driver colead_slm_driver_info = {

View File

@ -24,14 +24,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "colead-slm: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "colead-slm: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
enum {
IDLE,

View File

@ -31,14 +31,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "es51922: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "es51922: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/* Factors for the respective measurement mode (0 means "invalid"). */
static const float factors[8][8] = {

View File

@ -38,14 +38,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "fs9721: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "fs9721: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
static int parse_digit(uint8_t b)
{

View File

@ -29,14 +29,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "fs9922: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "fs9922: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
static gboolean flags_valid(const struct fs9922_info *info)
{

View File

@ -34,14 +34,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "metex14: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "metex14: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
static int parse_value(const uint8_t *buf, float *result)
{

View File

@ -35,14 +35,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "rs9lcd: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "rs9lcd: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/* Byte 1 of the packet, and the modes it represents */
#define IND1_HZ (1 << 7)

View File

@ -30,14 +30,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "ezusb: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "ezusb: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
SR_PRIV int ezusb_reset(struct libusb_device_handle *hdl, int set_clear)
{

View File

@ -37,14 +37,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "serial: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "serial: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
// FIXME: Must be moved, or rather passed as function argument.
#ifdef _WIN32

View File

@ -33,14 +33,14 @@
#define SUBCLASS_USBTMC 0x03
#define USBTMC_USB488 0x01
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "usb: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "usb: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/**
* Find USB devices according to a connection string.

View File

@ -31,14 +31,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "demo: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "demo: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/* TODO: Number of probes should be configurable. */
#define NUM_PROBES 8
@ -152,7 +152,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -496,7 +496,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
40, receive_data, devc);
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* We use this timestamp to decide how many more samples to send. */
devc->starttime = g_get_monotonic_time();

View File

@ -89,7 +89,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *fluke_scan(const char *conn, const char *serialcomm)
@ -332,7 +332,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->cb_data = cb_data;
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Poll every 100ms, or whenever some data comes in. */
serial = sdi->conn;
@ -351,7 +351,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, hw_dev_close,
sdi->conn, DRIVER_LOG_DOMAIN);
sdi->conn, LOG_PREFIX);
}
SR_PRIV struct sr_dev_driver flukedmm_driver_info = {

View File

@ -21,14 +21,14 @@
#ifndef LIBSIGROK_FLUKE_DMM_H
#define LIBSIGROK_FLUKE_DMM_H
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "fluke-dmm: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "fluke-dmm: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define FLUKEDMM_BUFSIZE 256

View File

@ -354,7 +354,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -1011,7 +1011,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
free(lupfd);
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
if ((ret = command_start_acquisition (usb->devhdl,
devc->cur_samplerate, devc->sample_wide)) != SR_OK) {

View File

@ -23,14 +23,14 @@
#include <glib.h>
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "fx2lafw: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "fx2lafw: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define USB_INTERFACE 0
#define USB_CONFIGURATION 1

View File

@ -251,7 +251,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -947,7 +947,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
free(lupfd);
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
return SR_OK;
}

View File

@ -22,14 +22,14 @@
#ifndef LIBSIGROK_HARDWARE_HANTEK_DSO_H
#define LIBSIGROK_HARDWARE_HANTEK_DSO_H
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "hantek-dso: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "hantek-dso: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define USB_INTERFACE 0
#define USB_CONFIGURATION 1

View File

@ -69,7 +69,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -384,7 +384,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
sr_dbg("Starting log retrieval.");
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
interval = (devc->config[0x1c] | (devc->config[0x1d] << 8)) * 1000;
packet.type = SR_DF_META;

View File

@ -24,14 +24,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "lascar-el-usb: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "lascar-el-usb: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define LASCAR_VENDOR "Lascar"
#define LASCAR_INTERFACE 0

View File

@ -53,7 +53,7 @@ static struct sr_dev_driver *di = &link_mso19_driver_info;
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -456,7 +456,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->trigger_state = 0x00;
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Our first probe is analog, the other 8 are of type 'logic'. */
/* TODO. */

View File

@ -29,14 +29,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "mso19: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "mso19: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define USB_VENDOR "3195"
#define USB_PRODUCT "f190"

View File

@ -83,7 +83,7 @@ static int hw_init(struct sr_context *sr_ctx, int idx)
{
sr_dbg("Selected '%s' subdriver.", mic_devs[idx].di->name);
return std_hw_init(sr_ctx, mic_devs[idx].di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, mic_devs[idx].di, LOG_PREFIX);
}
static GSList *scan(const char *conn, const char *serialcomm, int idx)
@ -277,7 +277,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->starttime = g_get_monotonic_time();
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Poll every 100ms, or whenever some data comes in. */
serial = sdi->conn;
@ -290,7 +290,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, hw_dev_close,
sdi->conn, DRIVER_LOG_DOMAIN);
sdi->conn, LOG_PREFIX);
}
/* Driver-specific API function wrappers */

View File

@ -28,14 +28,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "mic-985xx: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "mic-985xx: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/* Note: When adding entries here, don't forget to update MIC_DEV_COUNT. */
enum {

View File

@ -137,7 +137,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)

View File

@ -24,14 +24,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "nexus-osciprime: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "nexus-osciprime: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/** Private, per-device-instance driver context. */
struct dev_context {

View File

@ -55,7 +55,7 @@ static struct sr_dev_driver *di = &ols_driver_info;
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -487,7 +487,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->num_transfers = devc->num_samples = devc->num_bytes = 0;
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
sr_source_add(serial->fd, G_IO_IN, -1, ols_receive_data, cb_data);

View File

@ -26,14 +26,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "ols: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "ols: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define NUM_PROBES 32
#define NUM_TRIGGER_STAGES 4

View File

@ -194,7 +194,7 @@ static int set_cfg(const struct sr_dev_inst *sdi, const char *format, ...)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static int probe_port(const char *port, GSList **devices)
@ -612,7 +612,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
sr_source_add(serial->fd, G_IO_IN, 50, rigol_ds1xx2_receive, (void *)sdi);
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Fetch the first frame. */
if (devc->enabled_analog_probes) {

View File

@ -25,14 +25,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "rigol-ds1xx2: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "rigol-ds1xx2: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define ANALOG_WAVEFORM_SIZE 600
#define DIGITAL_WAVEFORM_SIZE 1210

View File

@ -227,7 +227,7 @@ static int hw_init(struct sr_context *sr_ctx, int dmm)
{
sr_dbg("Selected '%s' subdriver.", dmms[dmm].di->name);
return std_hw_init(sr_ctx, dmms[dmm].di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, dmms[dmm].di, LOG_PREFIX);
}
static GSList *scan(const char *conn, const char *serialcomm, int dmm)
@ -461,7 +461,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->starttime = g_get_monotonic_time();
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Poll every 50ms, or whenever some data comes in. */
serial = sdi->conn;
@ -474,7 +474,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, hw_dev_close,
sdi->conn, DRIVER_LOG_DOMAIN);
sdi->conn, LOG_PREFIX);
}
/* Driver-specific API function wrappers */

View File

@ -20,14 +20,14 @@
#ifndef LIBSIGROK_HARDWARE_SERIAL_DMM_PROTOCOL_H
#define LIBSIGROK_HARDWARE_SERIAL_DMM_PROTOCOL_H
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "serial-dmm: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "serial-dmm: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/* Note: When adding entries here, don't forget to update DMM_COUNT. */
enum {

View File

@ -70,7 +70,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -240,7 +240,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->cb_data = cb_data;
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* Poll every 500ms, or whenever some data comes in. */
serial = sdi->conn;
@ -253,7 +253,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, hw_dev_close,
sdi->conn, DRIVER_LOG_DOMAIN);
sdi->conn, LOG_PREFIX);
}
SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info = {

View File

@ -25,14 +25,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "tondaj-sl-814: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "tondaj-sl-814: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/** Private, per-device-instance driver context. */
struct dev_context {

View File

@ -102,7 +102,7 @@ static int hw_init(struct sr_context *sr_ctx, int dmm)
{
sr_dbg("Selected '%s' subdriver.", udmms[dmm].di->name);
return std_hw_init(sr_ctx, udmms[dmm].di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, udmms[dmm].di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options, int dmm)
@ -268,7 +268,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->cb_data = cb_data;
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
sr_source_add(0, 0, 10 /* poll_timeout */,
udmms[dmm].receive_data, (void *)sdi);

View File

@ -27,14 +27,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "uni-t-dmm: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "uni-t-dmm: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/* Note: When adding entries here, don't forget to update DMM_COUNT. */
enum {

View File

@ -77,7 +77,7 @@ static int clear_instances(void)
static int hw_init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN);
return std_hw_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *hw_scan(GSList *options)
@ -409,7 +409,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
devc->cb_data = cb_data;
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
pfd = libusb_get_pollfds(drvc->sr_ctx->libusb_ctx);
for (i = 0; pfd[i]; i++) {

View File

@ -24,14 +24,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "victor-dmm: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "victor-dmm: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define DMM_DATA_SIZE 14

View File

@ -628,7 +628,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
analyzer_get_trigger_address(usb->devhdl));
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
if (!(buf = g_try_malloc(PACKET_SIZE))) {
sr_err("Packet buffer malloc failed.");

View File

@ -28,14 +28,14 @@
#include "libsigrok-internal.h"
#include "analyzer.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "zeroplus: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "zeroplus: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/* Private, per-device-instance driver context. */
struct dev_context {

View File

@ -27,14 +27,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "hwdriver: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "hwdriver: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/**
* @file

View File

@ -26,14 +26,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "input/binary: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "input/binary: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define CHUNKSIZE (512 * 1024)
#define DEFAULT_NUM_PROBES 8
@ -116,7 +116,7 @@ static int loadfile(struct sr_input *in, const char *filename)
num_probes = g_slist_length(in->sdi->probes);
/* Send header packet to the session bus. */
std_session_send_df_header(in->sdi, DRIVER_LOG_DOMAIN);
std_session_send_df_header(in->sdi, LOG_PREFIX);
if (ctx->samplerate) {
packet.type = SR_DF_META;

View File

@ -25,14 +25,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "input/chronovu-la8: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "input/chronovu-la8: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define NUM_PACKETS 2048
#define PACKET_SIZE 4096
@ -167,7 +167,7 @@ static int loadfile(struct sr_input *in, const char *filename)
sr_dbg("%s: samplerate is %" PRIu64, __func__, samplerate);
/* Send header packet to the session bus. */
std_session_send_df_header(in->sdi, DRIVER_LOG_DOMAIN);
std_session_send_df_header(in->sdi, LOG_PREFIX);
/* Send metadata about the SR_DF_LOGIC packets to come. */
packet.type = SR_DF_META;

View File

@ -64,14 +64,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "input/vcd: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "input/vcd: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define DEFAULT_NUM_PROBES 8
@ -575,7 +575,7 @@ static int loadfile(struct sr_input *in, const char *filename)
}
/* Send header packet to the session bus. */
std_session_send_df_header(in->sdi, DRIVER_LOG_DOMAIN);
std_session_send_df_header(in->sdi, LOG_PREFIX);
/* Send metadata about the SR_DF_LOGIC packets to come. */
packet.type = SR_DF_META;

View File

@ -25,14 +25,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "input/wav: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "input/wav: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
#define CHUNK_SIZE 4096
@ -144,7 +144,7 @@ static int loadfile(struct sr_input *in, const char *filename)
ctx = in->sdi->priv;
/* Send header packet to the session bus. */
std_session_send_df_header(in->sdi, DRIVER_LOG_DOMAIN);
std_session_send_df_header(in->sdi, LOG_PREFIX);
packet.type = SR_DF_META;
packet.payload = &meta;

View File

@ -24,14 +24,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "output/analog: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "output/analog: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
struct context {
int num_enabled_probes;

View File

@ -24,14 +24,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "output/binary: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "output/binary: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
static int data(struct sr_output *o, const uint8_t *data_in,
uint64_t length_in, uint8_t **data_out, uint64_t *length_out)

View File

@ -24,14 +24,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "output/chronovu-la8: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "output/chronovu-la8: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
struct context {
unsigned int num_enabled_probes;

View File

@ -25,14 +25,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "output/csv: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "output/csv: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
struct context {
unsigned int num_enabled_probes;

View File

@ -25,14 +25,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "output/gnuplot: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "output/gnuplot: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
struct context {
unsigned int num_enabled_probes;

View File

@ -31,14 +31,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "output/ols: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "output/ols: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
struct context {
uint64_t samplerate;

View File

@ -25,14 +25,14 @@
#include "libsigrok-internal.h"
#include "text.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "output/ascii: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "output/ascii: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
SR_PRIV int init_ascii(struct sr_output *o)
{

View File

@ -25,14 +25,14 @@
#include "libsigrok-internal.h"
#include "text.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "output/bits: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "output/bits: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
SR_PRIV int init_bits(struct sr_output *o)
{

View File

@ -25,14 +25,14 @@
#include "libsigrok-internal.h"
#include "text.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "output/hex: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "output/hex: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
SR_PRIV int init_hex(struct sr_output *o)
{

View File

@ -27,14 +27,14 @@
#include "libsigrok-internal.h"
#include "text.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "output/text: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "output/text: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
SR_PRIV void flush_linebufs(struct context *ctx, uint8_t *outbuf)
{

View File

@ -26,14 +26,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "output/vcd: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "output/vcd: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
struct context {
int num_enabled_probes;

View File

@ -25,14 +25,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "session: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "session: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/**
* @file

View File

@ -26,14 +26,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "virtual-session: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "virtual-session: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/* size of payloads sent across the session bus */
/** @cond PRIVATE */
@ -248,7 +248,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
}
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
std_session_send_df_header(cb_data, LOG_PREFIX);
/* freewheeling source */
sr_session_source_add(-1, 0, 0, receive_data, cb_data);

View File

@ -27,14 +27,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "session-file: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "session-file: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/**
* @file

View File

@ -24,14 +24,14 @@
#include "libsigrok.h"
#include "libsigrok-internal.h"
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "strutil: "
#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/* Message logging helpers with subsystem-specific prefix string. */
#define LOG_PREFIX "strutil: "
#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
/**
* @file