Skip to content

Commit 4645cb8

Browse files
zeldinzougloub
authored andcommitted
fx2lafw: Add SuperSpeed Explorer Kit, with a new FX3 dev_cap
1 parent bd5c974 commit 4645cb8

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/hardware/fx2lafw/api.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ static const struct fx2lafw_profile supported_fx2[] = {
112112
"fx2lafw-usb-c-grok.fw",
113113
0, NULL, NULL},
114114

115+
/*
116+
* Cypress SuperSpeed Explorer Kit (CYUSB3KIT-003)
117+
*/
118+
{ 0x04b4, 0x00f3, "Cypress", "SuperSpeed Explorer Kit", NULL,
119+
"fx3lafw-cypress-fx3.fw",
120+
DEV_CAPS_FX3 | DEV_CAPS_16BIT, NULL, NULL },
121+
115122
ALL_ZERO
116123
};
117124

src/hardware/fx2lafw/protocol.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ static int command_start_acquisition(const struct sr_dev_inst *sdi)
8989
samplerate = devc->cur_samplerate;
9090

9191
/* Compute the sample rate. */
92-
if (devc->sample_wide && samplerate > MAX_16BIT_SAMPLE_RATE) {
92+
if (!(devc->profile->dev_caps & DEV_CAPS_FX3) &&
93+
devc->sample_wide && samplerate > MAX_16BIT_SAMPLE_RATE) {
9394
sr_err("Unable to sample at %" PRIu64 "Hz "
9495
"when collecting 16-bit samples.", samplerate);
9596
return SR_ERR;

src/hardware/fx2lafw/protocol.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@
5151

5252
#define DEV_CAPS_16BIT_POS 0
5353
#define DEV_CAPS_AX_ANALOG_POS 1
54+
#define DEV_CAPS_FX3_POS 2
5455

5556
#define DEV_CAPS_16BIT (1 << DEV_CAPS_16BIT_POS)
5657
#define DEV_CAPS_AX_ANALOG (1 << DEV_CAPS_AX_ANALOG_POS)
58+
#define DEV_CAPS_FX3 (1 << DEV_CAPS_FX3_POS)
5759

5860
/* Protocol commands */
5961
#define CMD_GET_FW_VERSION 0xb0

0 commit comments

Comments
 (0)