]> sigrok.org Git - libsigrok.git/blobdiff - hardware/fx2lafw/fx2lafw.c
sr: fx2lafw: Add basic support for USBee DX and clones
[libsigrok.git] / hardware / fx2lafw / fx2lafw.c
index be84761a7db48fe10b952f7d3e2b1598ffd76a55..7142a35de7037f9070bc651f0798b1935bf50d76 100644 (file)
 #include "command.h"
 
 static const struct fx2lafw_profile supported_fx2[] = {
+       /*
+        * CWAV USBee DX
+        * XZL Studio DX
+        */
+       { 0x08a9, 0x0015, "CWAV", "USBee DX", NULL,
+               FIRMWARE_DIR "/fx2lafw-cwav-usbeedx.fw",
+               0 },
        /*
         * CWAV USBee AX
         * EE Electronics ESLA201A
@@ -662,11 +669,11 @@ static int receive_data(int fd, int revents, void *cb_data)
 
 static void abort_acquisition(struct context *ctx)
 {
-       unsigned int i;
+       int i;
 
        ctx->num_samples = -1;
 
-       for (i = 0; i < ctx->num_transfers; i++) {
+       for (i = ctx->num_transfers - 1; i >= 0; i--) {
                if (ctx->transfers[i])
                        libusb_cancel_transfer(ctx->transfers[i]);
        }