fx2lafw: Always enable wide sampling for dslogic firmware

Fixes regression in 8399f68a3.

Ref: https://sourceforge.net/p/sigrok/mailman/message/35780588/

Signed-off-by: Angus Gratton <gus@projectgus.com>
This commit is contained in:
Angus Gratton 2017-04-12 17:26:45 +10:00 committed by Uwe Hermann
parent 45fcaf2cca
commit 8a68f96eae
2 changed files with 14 additions and 9 deletions

View File

@ -57,29 +57,29 @@ static const struct fx2lafw_profile supported_fx2[] = {
/* DreamSourceLab DSLogic (before FW upload) */
{ 0x2a0e, 0x0001, "DreamSourceLab", "DSLogic", NULL,
"dreamsourcelab-dslogic-fx2.fw",
DEV_CAPS_16BIT, NULL, NULL},
DEV_CAPS_16BIT | DEV_CAPS_DSLOGIC_FW, NULL, NULL},
/* DreamSourceLab DSLogic (after FW upload) */
{ 0x2a0e, 0x0001, "DreamSourceLab", "DSLogic", NULL,
"dreamsourcelab-dslogic-fx2.fw",
DEV_CAPS_16BIT, "DreamSourceLab", "DSLogic"},
DEV_CAPS_16BIT | DEV_CAPS_DSLOGIC_FW, "DreamSourceLab", "DSLogic"},
/* DreamSourceLab DSCope (before FW upload) */
{ 0x2a0e, 0x0002, "DreamSourceLab", "DSCope", NULL,
"dreamsourcelab-dscope-fx2.fw",
DEV_CAPS_16BIT, NULL, NULL},
DEV_CAPS_16BIT | DEV_CAPS_DSLOGIC_FW, NULL, NULL},
/* DreamSourceLab DSCope (after FW upload) */
{ 0x2a0e, 0x0002, "DreamSourceLab", "DSCope", NULL,
"dreamsourcelab-dscope-fx2.fw",
DEV_CAPS_16BIT, "DreamSourceLab", "DSCope"},
DEV_CAPS_16BIT | DEV_CAPS_DSLOGIC_FW, "DreamSourceLab", "DSCope"},
/* DreamSourceLab DSLogic Pro (before FW upload) */
{ 0x2a0e, 0x0003, "DreamSourceLab", "DSLogic Pro", NULL,
"dreamsourcelab-dslogic-pro-fx2.fw",
DEV_CAPS_16BIT, NULL, NULL},
DEV_CAPS_16BIT | DEV_CAPS_DSLOGIC_FW, NULL, NULL},
/* DreamSourceLab DSLogic Pro (after FW upload) */
{ 0x2a0e, 0x0003, "DreamSourceLab", "DSLogic Pro", NULL,
"dreamsourcelab-dslogic-pro-fx2.fw",
DEV_CAPS_16BIT, "DreamSourceLab", "DSLogic"},
DEV_CAPS_16BIT | DEV_CAPS_DSLOGIC_FW, "DreamSourceLab", "DSLogic"},
/*
* Saleae Logic
@ -1004,10 +1004,13 @@ static int configure_channels(const struct sr_dev_inst *sdi)
}
/*
* Use wide sampling if either any of the LA channels 8..15 is enabled
* and/or at least one analog channel is enabled.
* Use wide sampling if either any of the LA channels 8..15 is enabled,
* and/or at least one analog channel is enabled, and/or the device
* is running DSLogic firmware (not fx2lafw).
*/
devc->sample_wide = (channel_mask > 0xff || num_analog > 0);
devc->sample_wide = (channel_mask > 0xff
|| num_analog > 0
|| (devc->profile->dev_caps & DEV_CAPS_DSLOGIC_FW));
return SR_OK;
}

View File

@ -51,9 +51,11 @@
#define DEV_CAPS_16BIT_POS 0
#define DEV_CAPS_AX_ANALOG_POS 1
#define DEV_CAPS_DSLOGIC_FW_POS 2
#define DEV_CAPS_16BIT (1 << DEV_CAPS_16BIT_POS)
#define DEV_CAPS_AX_ANALOG (1 << DEV_CAPS_AX_ANALOG_POS)
#define DEV_CAPS_DSLOGIC_FW (1 << DEV_CAPS_DSLOGIC_FW_POS)
#define DSLOGIC_FPGA_FIRMWARE_5V "dreamsourcelab-dslogic-fpga-5v.fw"
#define DSLOGIC_FPGA_FIRMWARE_3V3 "dreamsourcelab-dslogic-fpga-3v3.fw"