mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-13 13:32:53 +08:00
Add DSCopeC20/DSCopeC20P support
This commit is contained in:
parent
3f330f97d4
commit
7181fd8ce7
BIN
DSView/res/DSCopeC20.bin
Executable file
BIN
DSView/res/DSCopeC20.bin
Executable file
Binary file not shown.
BIN
DSView/res/DSCopeC20.fw
Executable file
BIN
DSView/res/DSCopeC20.fw
Executable file
Binary file not shown.
BIN
DSView/res/DSCopeC20P.fw
Executable file
BIN
DSView/res/DSCopeC20P.fw
Executable file
Binary file not shown.
@ -45,6 +45,9 @@
|
||||
#define VTH_ADDR 0x78
|
||||
#define EEWP_ADDR 0x70
|
||||
#define COMB_ADDR 0x68
|
||||
#define EXT_I2CSEL 0x71
|
||||
#define FPGA_I2CADDR 0x21
|
||||
#define EXT_I2CADDR 0x50
|
||||
|
||||
enum {
|
||||
DSL_CTL_FW_VERSION = 0,
|
||||
|
@ -1679,6 +1679,7 @@ static int dev_acquisition_start(struct sr_dev_inst *sdi, void *cb_data)
|
||||
int ret;
|
||||
struct ctl_wr_cmd wr_cmd;
|
||||
|
||||
|
||||
if (sdi->status != SR_ST_ACTIVE)
|
||||
return SR_ERR_DEV_CLOSED;
|
||||
|
||||
|
@ -271,7 +271,29 @@ SR_PRIV int dsl_wr_reg(const struct sr_dev_inst *sdi, uint8_t addr, uint8_t valu
|
||||
hdl = usb->devhdl;
|
||||
|
||||
wr_cmd.header.dest = DSL_CTL_I2C_REG;
|
||||
wr_cmd.header.offset = addr;
|
||||
wr_cmd.header.offset = (FPGA_I2CADDR << 8) + addr;
|
||||
wr_cmd.header.size = 1;
|
||||
wr_cmd.data[0] = value;
|
||||
if ((ret = command_ctl_wr(hdl, wr_cmd)) != SR_OK) {
|
||||
sr_err("Sent DSL_CTL_I2C_REG command failed.");
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
SR_PRIV int dsl_wr_ext(const struct sr_dev_inst *sdi, uint8_t addr, uint8_t value)
|
||||
{
|
||||
struct sr_usb_dev_inst *usb;
|
||||
struct libusb_device_handle *hdl;
|
||||
struct ctl_wr_cmd wr_cmd;
|
||||
int ret;
|
||||
|
||||
usb = sdi->conn;
|
||||
hdl = usb->devhdl;
|
||||
|
||||
wr_cmd.header.dest = DSL_CTL_I2C_REG;
|
||||
wr_cmd.header.offset = (EXT_I2CADDR << 8) + addr;
|
||||
wr_cmd.header.size = 1;
|
||||
wr_cmd.data[0] = value;
|
||||
if ((ret = command_ctl_wr(hdl, wr_cmd)) != SR_OK) {
|
||||
@ -1112,7 +1134,7 @@ SR_PRIV int dsl_dev_status_get(const struct sr_dev_inst *sdi, struct sr_status *
|
||||
usb = sdi->conn;
|
||||
if (prg && (devc->status == DSL_START)) {
|
||||
rd_cmd.header.dest = DSL_CTL_DSO_MEASURE;
|
||||
rd_cmd.header.offset = begin;
|
||||
rd_cmd.header.offset = (FPGA_I2CADDR << 8) + begin;
|
||||
rd_cmd.header.size = end - begin + 1;
|
||||
rd_cmd.data = (unsigned char*)status;
|
||||
ret = command_ctl_rd(usb->devhdl, rd_cmd);
|
||||
|
@ -257,6 +257,18 @@ static const struct DSL_profile supported_DSCope[] = {
|
||||
"DSCope20.bin",
|
||||
DEV_CAPS_16BIT},
|
||||
|
||||
{0x2A0E, 0x0023, NULL, "DSCope C20", NULL,
|
||||
"DSCopeC20.fw",
|
||||
"DSCopeC20.bin",
|
||||
"DSCopeC20.bin",
|
||||
DEV_CAPS_16BIT},
|
||||
|
||||
{0x2A0E, 0x0024, NULL, "DSCope C20P", NULL,
|
||||
"DSCopeC20P.fw",
|
||||
"DSCopeC20.bin",
|
||||
"DSCopeC20.bin",
|
||||
DEV_CAPS_16BIT},
|
||||
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
@ -409,6 +421,7 @@ SR_PRIV int dsl_configure_probes(const struct sr_dev_inst *sdi);
|
||||
SR_PRIV uint64_t dsl_channel_depth(const struct sr_dev_inst *sdi);
|
||||
|
||||
SR_PRIV int dsl_wr_reg(const struct sr_dev_inst *sdi, uint8_t addr, uint8_t value);
|
||||
SR_PRIV int dsl_wr_ext(const struct sr_dev_inst *sdi, uint8_t addr, uint8_t value);
|
||||
SR_PRIV int dsl_wr_dso(const struct sr_dev_inst *sdi, uint64_t cmd);
|
||||
SR_PRIV int dsl_wr_nvm(const struct sr_dev_inst *sdi, unsigned char *ctx, uint16_t addr, uint8_t len);
|
||||
SR_PRIV int dsl_rd_nvm(const struct sr_dev_inst *sdi, unsigned char *ctx, uint16_t addr, uint8_t len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user