]> sigrok.org Git - libsigrok.git/commitdiff
fx2lafw: Send start command after bulk transfer have been set up
authorJoel Holdsworth <redacted>
Sun, 11 Mar 2012 19:00:52 +0000 (19:00 +0000)
committerJoel Holdsworth <redacted>
Sun, 11 Mar 2012 20:59:39 +0000 (20:59 +0000)
hardware/fx2lafw/fx2lafw.c

index 359df017a56f223817453ce5be5f330b8af15b08..d1272dd11a625411e17f083f1e30e0da6f9d719b 100644 (file)
@@ -620,11 +620,6 @@ static int hw_dev_acquisition_start(int dev_index, void *cb_data)
                return SR_ERR_MALLOC;
        }
 
-       if ((err = command_start_acquisition (ctx->usb->devhdl,
-               ctx->cur_samplerate)) != SR_OK) {
-               return err;
-       }
-
        /* Start with 2K transfer, subsequently increased to 4K. */
        size = 2048;
        for (i = 0; i < NUM_SIMUL_TRANSFERS; i++) {
@@ -661,6 +656,11 @@ static int hw_dev_acquisition_start(int dev_index, void *cb_data)
        g_free(header);
        g_free(packet);
 
+       if ((err = command_start_acquisition (ctx->usb->devhdl,
+               ctx->cur_samplerate)) != SR_OK) {
+               return err;
+       }
+
        return SR_OK;
 }