]> sigrok.org Git - libsigrok.git/commitdiff
Drivers: Explicitly list sr_samplerates fields.
authorUwe Hermann <redacted>
Tue, 29 Jan 2013 11:55:00 +0000 (12:55 +0100)
committerUwe Hermann <redacted>
Tue, 29 Jan 2013 11:56:02 +0000 (12:56 +0100)
This makes it a bit easier to understand which value means what, just
from looking at the driver code.

hardware/asix-sigma/asix-sigma.c
hardware/demo/demo.c
hardware/fx2lafw/fx2lafw.c
hardware/link-mso19/api.c
hardware/openbench-logic-sniffer/api.c
hardware/zeroplus-logic-cube/zeroplus.c

index 59a1ec4289c3e183494582b75a7a03a492ab36d3..afbf51deb2b3113bff88f2ac72a8afde1c5910ec 100644 (file)
@@ -70,10 +70,10 @@ static const char *probe_names[NUM_PROBES + 1] = {
 };
 
 static const struct sr_samplerates samplerates = {
-       0,
-       0,
-       0,
-       supported_samplerates,
+       .low  = 0,
+       .high = 0,
+       .step = 0,
+       .list = supported_samplerates,
 };
 
 static const int hwcaps[] = {
index 60a511f2532f6d4321d2fbf1ff225c2affd0b212..be989fe70cca85fd4b1cade5b8aff44752cd0b30 100644 (file)
@@ -94,10 +94,10 @@ static const int hwcaps[] = {
 };
 
 static const struct sr_samplerates samplerates = {
-       SR_HZ(1),
-       SR_GHZ(1),
-       SR_HZ(1),
-       NULL,
+       .low  = SR_HZ(1),
+       .high = SR_GHZ(1),
+       .step = SR_HZ(1),
+       .list = NULL,
 };
 
 static const char *pattern_strings[] = {
index a0955371a21e105fd129208a03e7c6d4ef264691..fb673d675ac784725cf7e20f78a61bdc49230a6d 100644 (file)
@@ -118,10 +118,10 @@ static const uint64_t supported_samplerates[] = {
 };
 
 static const struct sr_samplerates samplerates = {
-       0,
-       0,
-       0,
-       supported_samplerates,
+       .low  = 0,
+       .high = 0,
+       .step = 0,
+       .list = supported_samplerates,
 };
 
 SR_PRIV struct sr_dev_driver fx2lafw_driver_info;
index 9fcb9cf81f49d3a9ce32c89562b29620a3f1f81c..93b77673203b30b8927933a56b442b18509398b1 100644 (file)
@@ -41,12 +41,11 @@ SR_PRIV const char *mso19_probe_names[NUM_PROBES + 1] = {
        "0", "1", "2", "3", "4", "5", "6", "7", NULL
 };
 
-/*supported samplerates */
 static const struct sr_samplerates samplerates = {
-       SR_HZ(100),
-       SR_MHZ(200),
-       SR_HZ(100),
-       NULL,
+       .low  = SR_HZ(100),
+       .high = SR_MHZ(200),
+       .step = SR_HZ(100),
+       .list = NULL,
 };
 
 SR_PRIV struct sr_dev_driver link_mso19_driver_info;
index f69ca5113b91f883298d104483db68bd17942cd3..b2717016cd22af2b80954879706c5c16de3121eb 100644 (file)
@@ -44,12 +44,12 @@ SR_PRIV const char *ols_probe_names[NUM_PROBES + 1] = {
        NULL,
 };
 
-/* default supported samplerates, can be overridden by device metadata */
+/* Default supported samplerates, can be overridden by device metadata. */
 static const struct sr_samplerates samplerates = {
-       SR_HZ(10),
-       SR_MHZ(200),
-       SR_HZ(1),
-       NULL,
+       .low  = SR_HZ(10),
+       .high = SR_MHZ(200),
+       .step = SR_HZ(1),
+       .list = NULL,
 };
 
 SR_PRIV struct sr_dev_driver ols_driver_info;
index 9d9e227d1b1ecf8120b4e1284ca67de03815768b..00200b6954762395cd99835f1e00b6caec1e95d1 100644 (file)
@@ -126,10 +126,10 @@ static const uint64_t supported_samplerates[] = {
 };
 
 static const struct sr_samplerates samplerates = {
-       0,
-       0,
-       0,
-       supported_samplerates,
+       .low  = 0,
+       .high = 0,
+       .step = 0,
+       .list = supported_samplerates,
 };
 
 /* Private, per-device-instance driver context. */