]> sigrok.org Git - libsigrok.git/commitdiff
fx2lafw/dslogic: Updated bRequest #defines to reflect libsigrok4DSL
authorJoel Holdsworth <redacted>
Thu, 8 Jun 2017 22:45:38 +0000 (16:45 -0600)
committerUwe Hermann <redacted>
Mon, 19 Jun 2017 22:18:16 +0000 (00:18 +0200)
src/hardware/fx2lafw/dslogic.c
src/hardware/fx2lafw/dslogic.h

index a3c45be90686b6be4a9a01c727dae867897d9b85..80c0986fca70b497c168bf70b013c91a17da974e 100644 (file)
@@ -48,7 +48,7 @@ SR_PRIV int dslogic_set_vth(const struct sr_dev_inst *sdi, double vth)
 
        /* Send the control command. */
        ret = libusb_control_transfer(usb->devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
-                       LIBUSB_ENDPOINT_OUT, DS_CMD_VTH, 0x0000, 0x0000,
+                       LIBUSB_ENDPOINT_OUT, DS_CMD_WR_REG, 0x0000, 0x0000,
                        (unsigned char *)&cmd, sizeof(cmd), 3000);
        if (ret < 0) {
                sr_err("Unable to send VTH command: %s.",
@@ -85,7 +85,7 @@ SR_PRIV int dslogic_fpga_firmware_upload(const struct sr_dev_inst *sdi,
        /* Tell the device firmware is coming. */
        memset(cmd, 0, sizeof(cmd));
        if ((ret = libusb_control_transfer(usb->devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
-                       LIBUSB_ENDPOINT_OUT, DS_CMD_FPGA_FW, 0x0000, 0x0000,
+                       LIBUSB_ENDPOINT_OUT, DS_CMD_CONFIG, 0x0000, 0x0000,
                        (unsigned char *)&cmd, sizeof(cmd), USB_TIMEOUT)) < 0) {
                sr_err("Failed to upload FPGA firmware: %s.", libusb_error_name(ret));
                sr_resource_close(drvc->sr_ctx, &bitstream);
index f74367ade59499de7d2811b2f2767a5aec7c6c57..b3d518fcf974270ed9d4312ba9365c7224b2f241 100644 (file)
 #define DS_CMD_GET_FW_VERSION          0xb0
 #define DS_CMD_GET_REVID_VERSION       0xb1
 #define DS_CMD_START                   0xb2
-#define DS_CMD_FPGA_FW                 0xb3
-#define DS_CMD_CONFIG                  0xb4
-#define DS_CMD_VTH                     0xb8
+#define DS_CMD_CONFIG                  0xb3
+#define DS_CMD_SETTING                 0xb4
+#define DS_CMD_CONTROL                 0xb5
+#define DS_CMD_STATUS                  0xb6
+#define DS_CMD_STATUS_INFO             0xb7
+#define DS_CMD_WR_REG                  0xb8
+#define DS_CMD_WR_NVM                  0xb9
+#define DS_CMD_RD_NVM                  0xba
+#define DS_CMD_RD_NVM_PRE              0xbb
+#define DS_CMD_GET_HW_INFO             0xbc
 
 #define DS_NUM_TRIGGER_STAGES          16
 #define DS_START_FLAGS_STOP            (1 << 7)