]> sigrok.org Git - libsigrok.git/blobdiff - output/chronovu_la8.c
Rename 'struct sr_probe' to 'struct sr_channel' everywhere.
[libsigrok.git] / output / chronovu_la8.c
index a6184da2f00fd14087845fdb3a9128cf1bf60865..0d050fc034e6b92b998ae9072a885a574a96dd4b 100644 (file)
 #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)
+#define LOG_PREFIX "output/chronovu-la8"
 
 struct context {
        unsigned int num_enabled_probes;
@@ -91,7 +84,7 @@ static uint8_t samplerate_to_divcount(uint64_t samplerate)
 static int init(struct sr_output *o)
 {
        struct context *ctx;
-       struct sr_probe *probe;
+       struct sr_channel *probe;
        GSList *l;
        GVariant *gvar;
 
@@ -115,14 +108,16 @@ static int init(struct sr_output *o)
        /* Get the unitsize. */
        for (l = o->sdi->probes; l; l = l->next) {
                probe = l->data;
+               if (probe->type != SR_PROBE_LOGIC)
+                       continue;
                if (!probe->enabled)
                        continue;
                ctx->num_enabled_probes++;
        }
        ctx->unitsize = (ctx->num_enabled_probes + 7) / 8;
 
-       if (sr_config_get(o->sdi->driver, SR_CONF_SAMPLERATE, &gvar,
-                       o->sdi) == SR_OK) {
+       if (sr_config_get(o->sdi->driver, o->sdi, NULL, SR_CONF_SAMPLERATE,
+                       &gvar) == SR_OK) {
                ctx->samplerate = g_variant_get_uint64(gvar);
                g_variant_unref(gvar);
        } else