sr: Made sample rate lists const
This commit is contained in:
parent
1b79df2f57
commit
a533743dd1
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
static GSList *dev_insts = NULL;
|
static GSList *dev_insts = NULL;
|
||||||
|
|
||||||
static uint64_t supported_samplerates[] = {
|
static const uint64_t supported_samplerates[] = {
|
||||||
SR_KHZ(200),
|
SR_KHZ(200),
|
||||||
SR_KHZ(250),
|
SR_KHZ(250),
|
||||||
SR_KHZ(500),
|
SR_KHZ(500),
|
||||||
|
@ -81,7 +81,7 @@ static const char *probe_names[NUM_PROBES + 1] = {
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sr_samplerates samplerates = {
|
static const struct sr_samplerates samplerates = {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -120,7 +120,7 @@ static uint64_t supported_samplerates[255 + 1] = { 0 };
|
||||||
* Min: 1 sample per 0.01us -> sample time is 0.084s, samplerate 100MHz
|
* Min: 1 sample per 0.01us -> sample time is 0.084s, samplerate 100MHz
|
||||||
* Max: 1 sample per 2.55us -> sample time is 21.391s, samplerate 392.15kHz
|
* Max: 1 sample per 2.55us -> sample time is 21.391s, samplerate 392.15kHz
|
||||||
*/
|
*/
|
||||||
static struct sr_samplerates samplerates = {
|
static const struct sr_samplerates samplerates = {
|
||||||
.low = 0,
|
.low = 0,
|
||||||
.high = 0,
|
.high = 0,
|
||||||
.step = 0,
|
.step = 0,
|
||||||
|
|
|
@ -86,7 +86,7 @@ static const int hwcaps[] = {
|
||||||
SR_HWCAP_CONTINUOUS,
|
SR_HWCAP_CONTINUOUS,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sr_samplerates samplerates = {
|
static const struct sr_samplerates samplerates = {
|
||||||
SR_HZ(1),
|
SR_HZ(1),
|
||||||
SR_GHZ(1),
|
SR_GHZ(1),
|
||||||
SR_HZ(1),
|
SR_HZ(1),
|
||||||
|
|
|
@ -95,7 +95,7 @@ static const char *probe_names[] = {
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint64_t supported_samplerates[] = {
|
static const uint64_t supported_samplerates[] = {
|
||||||
SR_KHZ(20),
|
SR_KHZ(20),
|
||||||
SR_KHZ(25),
|
SR_KHZ(25),
|
||||||
SR_KHZ(50),
|
SR_KHZ(50),
|
||||||
|
@ -115,7 +115,7 @@ static uint64_t supported_samplerates[] = {
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sr_samplerates samplerates = {
|
static const struct sr_samplerates samplerates = {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -65,7 +65,7 @@ static const char *probe_names[NUM_PROBES + 1] = {
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint64_t supported_samplerates[] = {
|
static const uint64_t supported_samplerates[] = {
|
||||||
SR_HZ(100),
|
SR_HZ(100),
|
||||||
SR_HZ(200),
|
SR_HZ(200),
|
||||||
SR_HZ(500),
|
SR_HZ(500),
|
||||||
|
@ -89,7 +89,7 @@ static uint64_t supported_samplerates[] = {
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sr_samplerates samplerates = {
|
static const struct sr_samplerates samplerates = {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -93,7 +93,7 @@ static const char *probe_names[NUM_PROBES + 1] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* default supported samplerates, can be overridden by device metadata */
|
/* default supported samplerates, can be overridden by device metadata */
|
||||||
static struct sr_samplerates samplerates = {
|
static const struct sr_samplerates samplerates = {
|
||||||
SR_HZ(10),
|
SR_HZ(10),
|
||||||
SR_MHZ(200),
|
SR_MHZ(200),
|
||||||
SR_HZ(1),
|
SR_HZ(1),
|
||||||
|
|
|
@ -114,7 +114,7 @@ static libusb_context *usb_context = NULL;
|
||||||
* TODO: We shouldn't support 150MHz and 200MHz on devices that don't go up
|
* TODO: We shouldn't support 150MHz and 200MHz on devices that don't go up
|
||||||
* that high.
|
* that high.
|
||||||
*/
|
*/
|
||||||
static uint64_t supported_samplerates[] = {
|
static const uint64_t supported_samplerates[] = {
|
||||||
SR_HZ(100),
|
SR_HZ(100),
|
||||||
SR_HZ(500),
|
SR_HZ(500),
|
||||||
SR_KHZ(1),
|
SR_KHZ(1),
|
||||||
|
@ -136,7 +136,7 @@ static uint64_t supported_samplerates[] = {
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sr_samplerates samplerates = {
|
static const struct sr_samplerates samplerates = {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -449,7 +449,7 @@ struct sr_samplerates {
|
||||||
uint64_t low;
|
uint64_t low;
|
||||||
uint64_t high;
|
uint64_t high;
|
||||||
uint64_t step;
|
uint64_t step;
|
||||||
uint64_t *list;
|
const uint64_t *list;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sr_dev_driver {
|
struct sr_dev_driver {
|
||||||
|
|
Loading…
Reference in New Issue