]> sigrok.org Git - libsigrok.git/commitdiff
sr: Made sample rate lists const
authorJoel Holdsworth <redacted>
Mon, 7 May 2012 14:07:06 +0000 (15:07 +0100)
committerJoel Holdsworth <redacted>
Thu, 31 May 2012 18:51:11 +0000 (19:51 +0100)
hardware/asix-sigma/asix-sigma.c
hardware/chronovu-la8/chronovu-la8.c
hardware/demo/demo.c
hardware/fx2lafw/fx2lafw.c
hardware/link-mso19/link-mso19.c
hardware/openbench-logic-sniffer/ols.c
hardware/zeroplus-logic-cube/zeroplus.c
sigrok.h.in

index 59faa6e2adea2284ad88e561025c4ea5740ae3d2..c0a7aa42a46a92986678148f26c7b0f5f2fee79a 100644 (file)
@@ -42,7 +42,7 @@
 
 static GSList *dev_insts = NULL;
 
-static uint64_t supported_samplerates[] = {
+static const uint64_t supported_samplerates[] = {
        SR_KHZ(200),
        SR_KHZ(250),
        SR_KHZ(500),
@@ -81,7 +81,7 @@ static const char *probe_names[NUM_PROBES + 1] = {
        NULL,
 };
 
-static struct sr_samplerates samplerates = {
+static const struct sr_samplerates samplerates = {
        0,
        0,
        0,
index ad3e76010d129096cc68b32bd4a833545fb734e9..ba543d890c872671da435cf4c607ead88301708d 100644 (file)
@@ -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
  * 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,
        .high = 0,
        .step = 0,
index c5a7719c6624d15c8b28cd905e2a5d027a0f00a2..e511c0a6fac22340ee8a860cac571836ae0d0b22 100644 (file)
@@ -86,7 +86,7 @@ static const int hwcaps[] = {
        SR_HWCAP_CONTINUOUS,
 };
 
-static struct sr_samplerates samplerates = {
+static const struct sr_samplerates samplerates = {
        SR_HZ(1),
        SR_GHZ(1),
        SR_HZ(1),
index 9897fb9eab91cd7e0173d83b9b7265a9c4d00d0b..a40a17ac486b850426ea6b2d57693a4c6bce3a3a 100644 (file)
@@ -95,7 +95,7 @@ static const char *probe_names[] = {
        NULL,
 };
 
-static uint64_t supported_samplerates[] = {
+static const uint64_t supported_samplerates[] = {
        SR_KHZ(20),
        SR_KHZ(25),
        SR_KHZ(50),
@@ -115,7 +115,7 @@ static uint64_t supported_samplerates[] = {
        0,
 };
 
-static struct sr_samplerates samplerates = {
+static const struct sr_samplerates samplerates = {
        0,
        0,
        0,
index 19aa52255348cc1b9a44fe1c71504d94c8baeb8f..abf1fb98a4b65fedae3871eb224ff4ac5569c2c8 100644 (file)
@@ -65,7 +65,7 @@ static const char *probe_names[NUM_PROBES + 1] = {
        NULL,
 };
 
-static uint64_t supported_samplerates[] = {
+static const uint64_t supported_samplerates[] = {
        SR_HZ(100),
        SR_HZ(200),
        SR_HZ(500),
@@ -89,7 +89,7 @@ static uint64_t supported_samplerates[] = {
        0,
 };
 
-static struct sr_samplerates samplerates = {
+static const struct sr_samplerates samplerates = {
        0,
        0,
        0,
index 7cdd77e64076ba2cb898b78cb0f2246fe41bab1e..275d25defab15d939f3abe4f7b546e129200c2e4 100644 (file)
@@ -93,7 +93,7 @@ static const char *probe_names[NUM_PROBES + 1] = {
 };
 
 /* default supported samplerates, can be overridden by device metadata */
-static struct sr_samplerates samplerates = {
+static const struct sr_samplerates samplerates = {
        SR_HZ(10),
        SR_MHZ(200),
        SR_HZ(1),
index 5066a9c88b50b70caff1fabc39aff9d348a511b5..808b705343acc6140b67b06e39b7c08ec640d8da 100644 (file)
@@ -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
  * that high.
  */
-static uint64_t supported_samplerates[] = {
+static const uint64_t supported_samplerates[] = {
        SR_HZ(100),
        SR_HZ(500),
        SR_KHZ(1),
@@ -136,7 +136,7 @@ static uint64_t supported_samplerates[] = {
        0,
 };
 
-static struct sr_samplerates samplerates = {
+static const struct sr_samplerates samplerates = {
        0,
        0,
        0,
index 87749d60526b6ebeacff1503cbcf9e0690a47ea0..5fc1e1871524d2497e28674d1a06c70ec4dc371f 100644 (file)
@@ -449,7 +449,7 @@ struct sr_samplerates {
        uint64_t low;
        uint64_t high;
        uint64_t step;
-       uint64_t *list;
+       const uint64_t *list;
 };
 
 struct sr_dev_driver {