]> sigrok.org Git - libsigrok.git/blobdiff - hardware/lascar-el-usb/api.c
drivers: use new sr_config struct
[libsigrok.git] / hardware / lascar-el-usb / api.c
index e987570579838a318ad3b3b507e7a7147c6bdd1a..16349fddb3e4f895e3a1efd517d2270bd30990a0 100644 (file)
@@ -89,7 +89,7 @@ static GSList *hw_scan(GSList *options)
        struct dev_context *devc;
        struct sr_dev_inst *sdi;
        struct sr_usb_dev_inst *usb;
-       struct sr_hwopt *opt;
+       struct sr_config *src;
        GSList *usb_devices, *devices, *l;
        const char *conn;
 
@@ -105,10 +105,10 @@ static GSList *hw_scan(GSList *options)
 
        conn = NULL;
        for (l = options; l; l = l->next) {
-               opt = l->data;
-               switch (opt->hwopt) {
+               src = l->data;
+               switch (src->key) {
                case SR_HWOPT_CONN:
-                       conn = opt->value;
+                       conn = src->value;
                        break;
                }
        }
@@ -335,7 +335,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
 {
        struct sr_datafeed_packet packet;
        struct sr_datafeed_header header;
-       struct sr_datafeed_meta_analog meta;
        struct dev_context *devc;
        struct drv_context *drvc = di->priv;
        struct libusb_transfer *xfer_in, *xfer_out;
@@ -429,12 +428,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
        devc->log_size = xfer_in->buffer[1] + (xfer_in->buffer[2] << 8);
        libusb_free_transfer(xfer_out);
 
-       /* Send metadata about the SR_DF_ANALOG packets to come. */
-       packet.type = SR_DF_META_ANALOG;
-       packet.payload = &meta;
-       meta.num_probes = 1;
-       sr_session_send(devc->cb_data, &packet);
-
        pfd = libusb_get_pollfds(drvc->sr_ctx->libusb_ctx);
        for (i = 0; pfd[i]; i++) {
                /* Handle USB events every 100ms, for decent latency. */