]> sigrok.org Git - libsigrok.git/blobdiff - hardware/fx2lafw/fx2lafw.c
fx2lafw: Corrected check_conf_profile checks
[libsigrok.git] / hardware / fx2lafw / fx2lafw.c
index e213df9c2cd18ef4b6df5b090acc468a9d3b93a5..359df017a56f223817453ce5be5f330b8af15b08 100644 (file)
@@ -117,18 +117,13 @@ static gboolean check_conf_profile(libusb_device *dev)
                        break;
 
                intf_dsc = &(conf_dsc->interface[0].altsetting[0]);
-               if (intf_dsc->bNumEndpoints != 3)
-                       /* Need exactly 3 end points. */
+               if (intf_dsc->bNumEndpoints != 2)
+                       /* Need exactly 2 end points. */
                        break;
 
                if ((intf_dsc->endpoint[0].bEndpointAddress & 0x8f) !=
-                   (1 | LIBUSB_ENDPOINT_OUT))
-                       /* The first endpoint should be 1 (outbound). */
-                       break;
-
-               if ((intf_dsc->endpoint[1].bEndpointAddress & 0x8f) !=
-                   (2 | LIBUSB_ENDPOINT_IN))
-                       /* The second endpoint should be 2 (inbound). */
+                   (2 | LIBUSB_ENDPOINT_IN)) // 0x82
+                       /* The first endpoint should be 2 (inbound). */
                        break;
 
                /* TODO: Check the debug channel... */
@@ -625,7 +620,8 @@ 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) {
+       if ((err = command_start_acquisition (ctx->usb->devhdl,
+               ctx->cur_samplerate)) != SR_OK) {
                return err;
        }