From: Joel Holdsworth Date: Thu, 8 Jun 2017 22:45:38 +0000 (-0600) Subject: fx2lafw/dslogic: Updated bRequest #defines to reflect libsigrok4DSL X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9d71f81532c3d30e65f83c33094df5ae4b023bc6;p=libsigrok.git fx2lafw/dslogic: Updated bRequest #defines to reflect libsigrok4DSL --- diff --git a/src/hardware/fx2lafw/dslogic.c b/src/hardware/fx2lafw/dslogic.c index a3c45be9..80c0986f 100644 --- a/src/hardware/fx2lafw/dslogic.c +++ b/src/hardware/fx2lafw/dslogic.c @@ -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); diff --git a/src/hardware/fx2lafw/dslogic.h b/src/hardware/fx2lafw/dslogic.h index f74367ad..b3d518fc 100644 --- a/src/hardware/fx2lafw/dslogic.h +++ b/src/hardware/fx2lafw/dslogic.h @@ -25,9 +25,16 @@ #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)