fx2lafw/dslogic: Updated bRequest #defines to reflect libsigrok4DSL
This commit is contained in:
parent
9082b5ccf7
commit
9d71f81532
|
@ -48,7 +48,7 @@ SR_PRIV int dslogic_set_vth(const struct sr_dev_inst *sdi, double vth)
|
||||||
|
|
||||||
/* Send the control command. */
|
/* Send the control command. */
|
||||||
ret = libusb_control_transfer(usb->devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
|
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);
|
(unsigned char *)&cmd, sizeof(cmd), 3000);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
sr_err("Unable to send VTH command: %s.",
|
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. */
|
/* Tell the device firmware is coming. */
|
||||||
memset(cmd, 0, sizeof(cmd));
|
memset(cmd, 0, sizeof(cmd));
|
||||||
if ((ret = libusb_control_transfer(usb->devhdl, LIBUSB_REQUEST_TYPE_VENDOR |
|
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) {
|
(unsigned char *)&cmd, sizeof(cmd), USB_TIMEOUT)) < 0) {
|
||||||
sr_err("Failed to upload FPGA firmware: %s.", libusb_error_name(ret));
|
sr_err("Failed to upload FPGA firmware: %s.", libusb_error_name(ret));
|
||||||
sr_resource_close(drvc->sr_ctx, &bitstream);
|
sr_resource_close(drvc->sr_ctx, &bitstream);
|
||||||
|
|
|
@ -25,9 +25,16 @@
|
||||||
#define DS_CMD_GET_FW_VERSION 0xb0
|
#define DS_CMD_GET_FW_VERSION 0xb0
|
||||||
#define DS_CMD_GET_REVID_VERSION 0xb1
|
#define DS_CMD_GET_REVID_VERSION 0xb1
|
||||||
#define DS_CMD_START 0xb2
|
#define DS_CMD_START 0xb2
|
||||||
#define DS_CMD_FPGA_FW 0xb3
|
#define DS_CMD_CONFIG 0xb3
|
||||||
#define DS_CMD_CONFIG 0xb4
|
#define DS_CMD_SETTING 0xb4
|
||||||
#define DS_CMD_VTH 0xb8
|
#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_NUM_TRIGGER_STAGES 16
|
||||||
#define DS_START_FLAGS_STOP (1 << 7)
|
#define DS_START_FLAGS_STOP (1 << 7)
|
||||||
|
|
Loading…
Reference in New Issue