]> sigrok.org Git - libsigrok.git/blobdiff - output/gnuplot.c
sr/cli/gtk/qt/: s/plugin/driver/.
[libsigrok.git] / output / gnuplot.c
index da4e25d28db0a61299d99e93e385b46338615eae..32369610a958064b4a3721acc00c2d9c7faab24c 100644 (file)
@@ -71,8 +71,8 @@ static int init(struct sr_output *o)
                return SR_ERR_ARG;
        }
 
-       if (!o->dev->plugin) {
-               sr_err("gnuplot out: %s: o->dev->plugin was NULL", __func__);
+       if (!o->dev->driver) {
+               sr_err("gnuplot out: %s: o->dev->driver was NULL", __func__);
                return SR_ERR_ARG;
        }
 
@@ -101,8 +101,8 @@ static int init(struct sr_output *o)
        num_probes = g_slist_length(o->dev->probes);
        comment[0] = '\0';
        if (sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) {
-               samplerate = *((uint64_t *) o->dev->plugin->get_dev_info(
-                               o->dev->plugin_index, SR_DI_CUR_SAMPLERATE));
+               samplerate = *((uint64_t *) o->dev->driver->dev_info_get(
+                               o->dev->driver_index, SR_DI_CUR_SAMPLERATE));
                if (!(frequency_s = sr_samplerate_string(samplerate))) {
                        sr_err("gnuplot out: %s: sr_samplerate_string failed",
                               __func__);
@@ -148,8 +148,6 @@ static int init(struct sr_output *o)
 static int event(struct sr_output *o, int event_type, char **data_out,
                 uint64_t *length_out)
 {
-       struct context *ctx;
-
        if (!o) {
                sr_err("gnuplot out: %s: o was NULL", __func__);
                return SR_ERR_ARG;
@@ -165,8 +163,6 @@ static int event(struct sr_output *o, int event_type, char **data_out,
                return SR_ERR_ARG;
        }
 
-       ctx = o->internal;
-
        switch (event_type) {
        case SR_DF_TRIGGER:
                /* TODO: Can a trigger mark be in a gnuplot data file? */
@@ -324,9 +320,9 @@ static int analog_init(struct sr_output *o)
 
        num_probes = g_slist_length(o->dev->probes);
        comment[0] = '\0';
-       if (o->dev->plugin && sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) {
-               samplerate = *((uint64_t *) o->dev->plugin->get_dev_info(
-                               o->dev->plugin_index, SR_DI_CUR_SAMPLERATE));
+       if (o->dev->driver && sr_dev_has_hwcap(o->dev, SR_HWCAP_SAMPLERATE)) {
+               samplerate = *((uint64_t *) o->dev->driver->dev_info_get(
+                               o->dev->driver_index, SR_DI_CUR_SAMPLERATE));
                if (!(frequency_s = sr_samplerate_string(samplerate))) {
                        g_free(ctx->header);
                        g_free(ctx);