From: Uwe Hermann Date: Sat, 24 Mar 2012 21:32:47 +0000 (+0100) Subject: sr: Fix some samplerate fields. X-Git-Tag: libsigrok-0.1.0~25 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=590b9f9a91a703ceea4c430566735d05a2acf82b;p=libsigrok.git sr: Fix some samplerate fields. --- diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 475da6ca..73834203 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -83,9 +83,9 @@ static const char *probe_names[NUM_PROBES + 1] = { }; static struct sr_samplerates samplerates = { - SR_KHZ(200), - SR_MHZ(200), - SR_HZ(0), + 0, + 0, + 0, supported_samplerates, }; diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 7f0c6734..d88a20ce 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -72,7 +72,7 @@ static const char *fx2lafw_probe_names[] = { NULL, }; -static uint64_t fx2lafw_supported_samplerates[] = { +static uint64_t supported_samplerates[] = { SR_MHZ(1), SR_MHZ(2), SR_MHZ(3), @@ -84,11 +84,11 @@ static uint64_t fx2lafw_supported_samplerates[] = { SR_MHZ(24), }; -static struct sr_samplerates fx2lafw_samplerates = { - SR_MHZ(1), - SR_MHZ(24), - SR_HZ(0), - fx2lafw_supported_samplerates, +static struct sr_samplerates samplerates = { + 0, + 0, + 0, + supported_samplerates, }; static GSList *dev_insts = NULL; @@ -431,7 +431,7 @@ static int hw_dev_open(int dev_index) if (ctx->cur_samplerate == 0) { /* Samplerate hasn't been set; default to the slowest one. */ if (hw_dev_config_set(dev_index, SR_HWCAP_SAMPLERATE, - &fx2lafw_supported_samplerates[0]) == SR_ERR) + &supported_samplerates[0]) == SR_ERR) return SR_ERR; } @@ -506,7 +506,7 @@ static void *hw_dev_info_get(int dev_index, int dev_info_id) case SR_DI_PROBE_NAMES: return fx2lafw_probe_names; case SR_DI_SAMPLERATES: - return &fx2lafw_samplerates; + return &samplerates; case SR_DI_TRIGGER_TYPES: return TRIGGER_TYPES; case SR_DI_CUR_SAMPLERATE: diff --git a/hardware/link-mso19/link-mso19.c b/hardware/link-mso19/link-mso19.c index b9df6c55..024e67b8 100644 --- a/hardware/link-mso19/link-mso19.c +++ b/hardware/link-mso19/link-mso19.c @@ -90,9 +90,9 @@ static uint64_t supported_samplerates[] = { }; static struct sr_samplerates samplerates = { - SR_HZ(100), - SR_MHZ(200), - SR_HZ(0), + 0, + 0, + 0, supported_samplerates, }; diff --git a/hardware/saleae-logic/saleae-logic.c b/hardware/saleae-logic/saleae-logic.c index 50a69442..d1b2e11a 100644 --- a/hardware/saleae-logic/saleae-logic.c +++ b/hardware/saleae-logic/saleae-logic.c @@ -87,9 +87,9 @@ static uint64_t supported_samplerates[] = { }; static struct sr_samplerates samplerates = { - SR_KHZ(200), - SR_MHZ(24), - SR_HZ(0), + 0, + 0, + 0, supported_samplerates, }; diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index c6131a51..8bfc5ad8 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -135,9 +135,9 @@ static uint64_t supported_samplerates[] = { }; static struct sr_samplerates samplerates = { - SR_HZ(0), - SR_HZ(0), - SR_HZ(0), + 0, + 0, + 0, supported_samplerates, };