]> sigrok.org Git - libsigrok.git/blobdiff - hardware/fx2lafw/fx2lafw.c
fx2lafw: Implemented initial support for start capture
[libsigrok.git] / hardware / fx2lafw / fx2lafw.c
index 2bf1bda6b229be9070bdc7696e944dba1321b59a..5a40be92c0a831bcd43ec68e72be64c68874b73c 100644 (file)
@@ -26,6 +26,7 @@
 #include "sigrok.h"
 #include "sigrok-internal.h"
 #include "fx2lafw.h"
+#include "command.h"
 
 static struct fx2lafw_profile supported_fx2[] = {
        /* USBee AX */
@@ -590,7 +591,7 @@ static int hw_dev_acquisition_start(int dev_index, void *cb_data)
        struct context *ctx;
        struct libusb_transfer *transfer;
        const struct libusb_pollfd **lupfd;
-       int size, i;
+       int err, size, i;
        unsigned char *buf;
 
        if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
@@ -608,6 +609,10 @@ static int hw_dev_acquisition_start(int dev_index, void *cb_data)
                return SR_ERR_MALLOC;
        }
 
+       if ((err = command_start_acquisition (ctx->usb->devhdl)) != SR_OK) {
+               return err;
+       }
+
        /* Start with 2K transfer, subsequently increased to 4K. */
        size = 2048;
        for (i = 0; i < NUM_SIMUL_TRANSFERS; i++) {