]> sigrok.org Git - libsigrok.git/commitdiff
sr: Fix some samplerate fields.
authorUwe Hermann <redacted>
Sat, 24 Mar 2012 21:32:47 +0000 (22:32 +0100)
committerUwe Hermann <redacted>
Sat, 24 Mar 2012 21:32:47 +0000 (22:32 +0100)
hardware/asix-sigma/asix-sigma.c
hardware/fx2lafw/fx2lafw.c
hardware/link-mso19/link-mso19.c
hardware/saleae-logic/saleae-logic.c
hardware/zeroplus-logic-cube/zeroplus.c

index 475da6ca7002a1a36d035ce18fcca298b4ee7630..73834203fa4ad4b8207cd0edeca3cc15bd3b1039 100644 (file)
@@ -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,
 };
 
index 7f0c6734fd5246d2dddd2eb54b6fd3e324073ed4..d88a20cecd3c532823ef22081782131a0a7f97b6 100644 (file)
@@ -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:
index b9df6c55e08661148e19f247a55cecddef875935..024e67b8f429ae7e867c1699c19334ff3cbded2c 100644 (file)
@@ -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,
 };
 
index 50a6944223111659766aa82d51151f8cdd59e107..d1b2e11a73bad34df16168b07038c4b53d80af7f 100644 (file)
@@ -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,
 };
 
index c6131a51e601f0479c577c4bc88052ac6a050a30..8bfc5ad830be0a342a3115a0fd819d42eeda758c 100644 (file)
@@ -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,
 };