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.
This commit is contained in:
Uwe Hermann 2013-01-29 12:55:00 +01:00
parent 063e7aef6d
commit d3b38ad389
6 changed files with 25 additions and 26 deletions

View File

@ -70,10 +70,10 @@ static const char *probe_names[NUM_PROBES + 1] = {
}; };
static const struct sr_samplerates samplerates = { static const struct sr_samplerates samplerates = {
0, .low = 0,
0, .high = 0,
0, .step = 0,
supported_samplerates, .list = supported_samplerates,
}; };
static const int hwcaps[] = { static const int hwcaps[] = {

View File

@ -94,10 +94,10 @@ static const int hwcaps[] = {
}; };
static const struct sr_samplerates samplerates = { static const struct sr_samplerates samplerates = {
SR_HZ(1), .low = SR_HZ(1),
SR_GHZ(1), .high = SR_GHZ(1),
SR_HZ(1), .step = SR_HZ(1),
NULL, .list = NULL,
}; };
static const char *pattern_strings[] = { static const char *pattern_strings[] = {

View File

@ -118,10 +118,10 @@ static const uint64_t supported_samplerates[] = {
}; };
static const struct sr_samplerates samplerates = { static const struct sr_samplerates samplerates = {
0, .low = 0,
0, .high = 0,
0, .step = 0,
supported_samplerates, .list = supported_samplerates,
}; };
SR_PRIV struct sr_dev_driver fx2lafw_driver_info; SR_PRIV struct sr_dev_driver fx2lafw_driver_info;

View File

@ -41,12 +41,11 @@ SR_PRIV const char *mso19_probe_names[NUM_PROBES + 1] = {
"0", "1", "2", "3", "4", "5", "6", "7", NULL "0", "1", "2", "3", "4", "5", "6", "7", NULL
}; };
/*supported samplerates */
static const struct sr_samplerates samplerates = { static const struct sr_samplerates samplerates = {
SR_HZ(100), .low = SR_HZ(100),
SR_MHZ(200), .high = SR_MHZ(200),
SR_HZ(100), .step = SR_HZ(100),
NULL, .list = NULL,
}; };
SR_PRIV struct sr_dev_driver link_mso19_driver_info; SR_PRIV struct sr_dev_driver link_mso19_driver_info;

View File

@ -44,12 +44,12 @@ SR_PRIV const char *ols_probe_names[NUM_PROBES + 1] = {
NULL, 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 = { static const struct sr_samplerates samplerates = {
SR_HZ(10), .low = SR_HZ(10),
SR_MHZ(200), .high = SR_MHZ(200),
SR_HZ(1), .step = SR_HZ(1),
NULL, .list = NULL,
}; };
SR_PRIV struct sr_dev_driver ols_driver_info; SR_PRIV struct sr_dev_driver ols_driver_info;

View File

@ -126,10 +126,10 @@ static const uint64_t supported_samplerates[] = {
}; };
static const struct sr_samplerates samplerates = { static const struct sr_samplerates samplerates = {
0, .low = 0,
0, .high = 0,
0, .step = 0,
supported_samplerates, .list = supported_samplerates,
}; };
/* Private, per-device-instance driver context. */ /* Private, per-device-instance driver context. */