]> sigrok.org Git - libsigrok.git/commitdiff
fx2lafw/dslogic: Added DSLogic Plus and Basic variants
authorJoel Holdsworth <redacted>
Thu, 8 Jun 2017 16:59:13 +0000 (10:59 -0600)
committerUwe Hermann <redacted>
Mon, 19 Jun 2017 22:18:16 +0000 (00:18 +0200)
contrib/z60_libsigrok.rules
src/hardware/fx2lafw/api.c
src/hardware/fx2lafw/protocol.h

index 0dff43536fbed9c77d25cad429ba7a0bb0de1403..5752ba691cbab61f1d47147779a11ef9b09facb6 100644 (file)
@@ -83,6 +83,10 @@ ATTRS{idVendor}=="2a0e", ATTRS{idProduct}=="0001", MODE="660", GROUP="plugdev",
 ATTRS{idVendor}=="2a0e", ATTRS{idProduct}=="0003", MODE="660", GROUP="plugdev", TAG+="uaccess"
 # DreamSourceLab DScope
 ATTRS{idVendor}=="2a0e", ATTRS{idProduct}=="0002", MODE="660", GROUP="plugdev", TAG+="uaccess"
+# DreamSourceLab DSLogic Plus
+ATTRS{idVendor}=="2a0e", ATTRS{idProduct}=="0020", MODE="660", GROUP="plugdev", TAG+="uaccess"
+# DreamSourceLab DSLogic Basic
+ATTRS{idVendor}=="2a0e", ATTRS{idProduct}=="0021", MODE="660", GROUP="plugdev", TAG+="uaccess"
 
 # HAMEG HO720
 ATTRS{idVendor}=="0403", ATTRS{idProduct}=="ed72", MODE="660", GROUP="plugdev", TAG+="uaccess"
index 3f80b93e73c2d904be035a686e4e9292459854fc..c3a819b459121966e9e7715d23358e439aff655e 100644 (file)
@@ -81,6 +81,24 @@ static const struct fx2lafw_profile supported_fx2[] = {
                "dreamsourcelab-dslogic-pro-fx2.fw",
                DEV_CAPS_16BIT | DEV_CAPS_DSLOGIC_FW, "DreamSourceLab", "DSLogic"},
 
+       /* DreamSourceLab DSLogic Plus (before FW upload) */
+       { 0x2a0e, 0x0020, "DreamSourceLab", "DSLogic Plus", NULL,
+               "dreamsourcelab-dslogic-plus-fx2.fw",
+               DEV_CAPS_16BIT | DEV_CAPS_DSLOGIC_FW, NULL, NULL},
+       /* DreamSourceLab DSLogic Plus (after FW upload) */
+       { 0x2a0e, 0x0020, "DreamSourceLab", "DSLogic Plus", NULL,
+               "dreamsourcelab-dslogic-plus-fx2.fw",
+               DEV_CAPS_16BIT | DEV_CAPS_DSLOGIC_FW, "DreamSourceLab", "DSLogic"},
+
+       /* DreamSourceLab DSLogic Basic (before FW upload) */
+       { 0x2a0e, 0x0021, "DreamSourceLab", "DSLogic Basic", NULL,
+               "dreamsourcelab-dslogic-basic-fx2.fw",
+               DEV_CAPS_16BIT | DEV_CAPS_DSLOGIC_FW, NULL, NULL},
+       /* DreamSourceLab DSLogic Basic (after FW upload) */
+       { 0x2a0e, 0x0021, "DreamSourceLab", "DSLogic Basic", NULL,
+               "dreamsourcelab-dslogic-basic-fx2.fw",
+               DEV_CAPS_16BIT | DEV_CAPS_DSLOGIC_FW, "DreamSourceLab", "DSLogic"},
+
        /*
         * Saleae Logic
         * EE Electronics ESLA100
@@ -388,6 +406,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
                if (!strcmp(prof->model, "DSLogic")
                                || !strcmp(prof->model, "DSLogic Pro")
+                               || !strcmp(prof->model, "DSLogic Plus")
+                               || !strcmp(prof->model, "DSLogic Basic")
                                || !strcmp(prof->model, "DSCope")) {
                        devc->dslogic = TRUE;
                        devc->samplerates = dslogic_samplerates;
@@ -517,6 +537,10 @@ static int dev_open(struct sr_dev_inst *sdi)
                                fpga_firmware = DSLOGIC_FPGA_FIRMWARE_5V;
                } else if (!strcmp(devc->profile->model, "DSLogic Pro")){
                        fpga_firmware = DSLOGIC_PRO_FPGA_FIRMWARE;
+               } else if (!strcmp(devc->profile->model, "DSLogic Plus")){
+                       fpga_firmware = DSLOGIC_PLUS_FPGA_FIRMWARE;
+               } else if (!strcmp(devc->profile->model, "DSLogic Basic")){
+                       fpga_firmware = DSLOGIC_BASIC_FPGA_FIRMWARE;
                } else if (!strcmp(devc->profile->model, "DSCope")) {
                        fpga_firmware = DSCOPE_FPGA_FIRMWARE;
                }
@@ -695,6 +719,10 @@ static int config_set(uint32_t key, GVariant *data,
                                ret = dslogic_fpga_firmware_upload(sdi, DSLOGIC_FPGA_FIRMWARE_3V3);
                } else if (!strcmp(devc->profile->model, "DSLogic Pro")) {
                        ret = dslogic_fpga_firmware_upload(sdi, DSLOGIC_PRO_FPGA_FIRMWARE);
+               } else if (!strcmp(devc->profile->model, "DSLogic Plus")) {
+                       ret = dslogic_fpga_firmware_upload(sdi, DSLOGIC_PLUS_FPGA_FIRMWARE);
+               } else if (!strcmp(devc->profile->model, "DSLogic Basic")) {
+                       ret = dslogic_fpga_firmware_upload(sdi, DSLOGIC_BASIC_FPGA_FIRMWARE);
                }
                break;
        case SR_CONF_EXTERNAL_CLOCK:
index 24f17a9c8da054a4ea96c0a21a69bbb86b9a5b13..c3d6f32e35245c69593fd48ab6592f7b1616ae6e 100644 (file)
@@ -61,6 +61,8 @@
 #define DSLOGIC_FPGA_FIRMWARE_3V3 "dreamsourcelab-dslogic-fpga-3v3.fw"
 #define DSCOPE_FPGA_FIRMWARE "dreamsourcelab-dscope-fpga.fw"
 #define DSLOGIC_PRO_FPGA_FIRMWARE "dreamsourcelab-dslogic-pro-fpga.fw"
+#define DSLOGIC_PLUS_FPGA_FIRMWARE "dreamsourcelab-dslogic-plus-fpga.fw"
+#define DSLOGIC_BASIC_FPGA_FIRMWARE "dreamsourcelab-dslogic-basic-fpga.fw"
 
 /* Protocol commands */
 #define CMD_GET_FW_VERSION             0xb0