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);
}
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);
}
#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