]> sigrok.org Git - libsigrok.git/blobdiff - src/scpi/scpi_usbtmc_libusb.c
device.c: Whitespace/cosmetics and typo fixes.
[libsigrok.git] / src / scpi / scpi_usbtmc_libusb.c
index 9f49dd1d2ea8ec2e8f2fd7446b4df1852eb232c0..6e472750cb5d2f261227a9c2081f3f75c1ddb3ff 100644 (file)
@@ -106,6 +106,7 @@ static struct usbtmc_blacklist blacklist_remote[] = {
        { 0x1ab1, 0x0588 },  /* Rigol DS1000 series */
        { 0x1ab1, 0x04b0 },  /* Rigol DS2000 series */
        { 0x0957, 0x0588 },  /* Agilent DSO1000 series (rebadged Rigol DS1000) */
+       { 0x0b21, 0xffff },  /* All Yokogawa devices */
        ALL_ZERO
 };
 
@@ -192,7 +193,8 @@ static int check_usbtmc_blacklist(struct usbtmc_blacklist *blacklist,
        int i;
 
        for (i = 0; blacklist[i].vid; i++) {
-               if (blacklist[i].vid == vid && blacklist[i].pid == pid)
+               if ((blacklist[i].vid == vid && blacklist[i].pid == 0xFFFF) ||
+                       (blacklist[i].vid == vid && blacklist[i].pid == pid))
                        return TRUE;
        }
 
@@ -236,7 +238,7 @@ static int scpi_usbtmc_remote(struct scpi_usbtmc_libusb *uscpi)
                        LIBUSB_ENDPOINT_IN         |
                        LIBUSB_REQUEST_TYPE_CLASS  |
                        LIBUSB_RECIPIENT_INTERFACE,
-                       LOCAL_LOCKOUT, 1,
+                       LOCAL_LOCKOUT, 0,
                        uscpi->interface,
                        &status, 1,
                        TRANSFER_TIMEOUT);
@@ -274,7 +276,7 @@ static void scpi_usbtmc_local(struct scpi_usbtmc_libusb *uscpi)
                        LIBUSB_ENDPOINT_IN         |
                        LIBUSB_REQUEST_TYPE_CLASS  |
                        LIBUSB_RECIPIENT_INTERFACE,
-                       GO_TO_LOCAL, 1,
+                       GO_TO_LOCAL, 0,
                        uscpi->interface,
                        &status, 1,
                        TRANSFER_TIMEOUT);