From: Uwe Hermann Date: Tue, 29 Jan 2013 11:55:00 +0000 (+0100) Subject: Drivers: Explicitly list sr_samplerates fields. X-Git-Tag: dsupstream~290 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d3b38ad389a6186e2822d62b20b9f0d9d9e7c21c;p=libsigrok.git Drivers: Explicitly list sr_samplerates fields. This makes it a bit easier to understand which value means what, just from looking at the driver code. --- diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 59a1ec42..afbf51de 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -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[] = { diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index 60a511f2..be989fe7 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -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[] = { diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index a0955371..fb673d67 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -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; diff --git a/hardware/link-mso19/api.c b/hardware/link-mso19/api.c index 9fcb9cf8..93b77673 100644 --- a/hardware/link-mso19/api.c +++ b/hardware/link-mso19/api.c @@ -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; diff --git a/hardware/openbench-logic-sniffer/api.c b/hardware/openbench-logic-sniffer/api.c index f69ca511..b2717016 100644 --- a/hardware/openbench-logic-sniffer/api.c +++ b/hardware/openbench-logic-sniffer/api.c @@ -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; diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index 9d9e227d..00200b69 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -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. */