hantek-dso: Use message logging helpers.
This commit is contained in:
parent
140185af6c
commit
cbc6f3b253
|
@ -237,7 +237,7 @@ static int get_channel_offsets(struct dev_context *devc)
|
|||
devc->channel_levels[chan][v][0],
|
||||
devc->channel_levels[chan][v][1]);
|
||||
}
|
||||
sr_dbg(gs->str);
|
||||
sr_dbg("%s", gs->str);
|
||||
}
|
||||
g_string_free(gs, TRUE);
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ SR_PRIV int dso_set_relays(struct dev_context *devc)
|
|||
g_string_printf(gs, "Relays:");
|
||||
for (i = 0; i < 17; i++)
|
||||
g_string_append_printf(gs, " %.2x", relays[i]);
|
||||
sr_dbg(gs->str);
|
||||
sr_dbg("%s", gs->str);
|
||||
g_string_free(gs, TRUE);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,15 @@
|
|||
#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)
|
||||
|
||||
#define USB_INTERFACE 0
|
||||
#define USB_CONFIGURATION 1
|
||||
#define DSO_EP_IN 0x86
|
||||
|
|
Loading…
Reference in New Issue