]> sigrok.org Git - libsigrok.git/blobdiff - hardware/fx2lafw/api.c
fx2lafw: pass sdi to command functions.
[libsigrok.git] / hardware / fx2lafw / api.c
index b11a2e1a93ea4fd47ef8f0adce761c14a0570d18..7bfbdad934e809ea56d2c0383eca57170dafe16d 100644 (file)
@@ -197,7 +197,7 @@ static GSList *scan(GSList *options)
                /* Fill in channellist according to this device's profile. */
                num_logic_channels = prof->dev_caps & DEV_CAPS_16BIT ? 16 : 8;
                for (j = 0; j < num_logic_channels; j++) {
-                       if (!(ch = sr_probe_new(j, SR_PROBE_LOGIC, TRUE,
+                       if (!(ch = sr_channel_new(j, SR_CHANNEL_LOGIC, TRUE,
                                        channel_names[j])))
                                return NULL;
                        sdi->channels = g_slist_append(sdi->channels, ch);
@@ -483,7 +483,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        }
 
        devc->cb_data = cb_data;
-       devc->num_samples = 0;
+       devc->sent_samples = 0;
+       devc->acq_aborted = FALSE;
        devc->empty_transfer_count = 0;
 
        timeout = fx2lafw_get_timeout(devc);
@@ -526,8 +527,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        /* Send header packet to the session bus. */
        std_session_send_df_header(cb_data, LOG_PREFIX);
 
-       if ((ret = fx2lafw_command_start_acquisition(usb->devhdl,
-               devc->cur_samplerate, devc->sample_wide)) != SR_OK) {
+       if ((ret = fx2lafw_command_start_acquisition(sdi)) != SR_OK) {
                fx2lafw_abort_acquisition(devc);
                return ret;
        }