]> sigrok.org Git - libsigrok.git/commitdiff
Add SR_HZ macro for consistency.
authorUwe Hermann <redacted>
Tue, 22 Feb 2011 17:05:16 +0000 (18:05 +0100)
committerUwe Hermann <redacted>
Thu, 3 Mar 2011 19:24:24 +0000 (20:24 +0100)
hardware/asix-sigma/asix-sigma.c
hardware/demo/demo.c
hardware/link-mso19/link-mso19.c
hardware/openbench-logic-sniffer/ols.c
hardware/saleae-logic/saleae-logic.c
hardware/zeroplus-logic-cube/zeroplus.c
sigrok.h

index 61e926ead71ff06d2d2b9888d605c1dc375e1251..5b6417d9b8c1cbba135c8b4b045adabbb483a8da 100644 (file)
@@ -59,7 +59,7 @@ static uint64_t supported_samplerates[] = {
 static struct sr_samplerates samplerates = {
        SR_KHZ(200),
        SR_MHZ(200),
-       0,
+       SR_HZ(0),
        supported_samplerates,
 };
 
index 2f32b2cd9661a28b550cae3178cdffb0b1a03de4..fb6dd7f23df6dae6ead4406b426d617048ee095b 100644 (file)
@@ -64,9 +64,9 @@ static int capabilities[] = {
 };
 
 static struct sr_samplerates samplerates = {
-       1,
+       SR_HZ(1),
        SR_GHZ(1),
-       1,
+       SR_HZ(1),
        NULL,
 };
 
index 3c2be11dc717620493b289673097630465261337..18e28cff514fed93263b461a3456e34f7b6ccc69 100644 (file)
@@ -47,9 +47,9 @@ static int capabilities[] = {
 };
 
 static uint64_t supported_samplerates[] = {
-       100,
-       200,
-       500,
+       SR_HZ(100),
+       SR_HZ(200),
+       SR_HZ(500),
        SR_KHZ(1),
        SR_KHZ(2),
        SR_KHZ(5),
@@ -71,9 +71,9 @@ static uint64_t supported_samplerates[] = {
 };
 
 static struct sr_samplerates samplerates = {
-       100,
+       SR_HZ(100),
        SR_MHZ(200),
-       0,
+       SR_HZ(0),
        supported_samplerates,
 };
 
index 8f8f5cb2d8981519979a6a9661786593a4350c4f..51379d930391c95517b74888612e5ab326d43273 100644 (file)
@@ -92,10 +92,10 @@ static int capabilities[] = {
 };
 
 static struct sr_samplerates samplerates = {
-       10,
+       SR_HZ(10),
        SR_MHZ(200),
-       1,
-       0,
+       SR_HZ(1),
+       NULL,
 };
 
 /* List of struct sr_serial_device_instance */
index 23ba69a9aa52f4f3b900d5a9941444ea056bb1e9..e4356d9e4d72159da4f94829423079d48238a2ba 100644 (file)
@@ -89,7 +89,7 @@ static uint64_t supported_samplerates[] = {
 static struct sr_samplerates samplerates = {
        SR_KHZ(200),
        SR_MHZ(24),
-       0,
+       SR_HZ(0),
        supported_samplerates,
 };
 
index e9b599b839fc0c316e4061232cdafc216a97a203..e18d4db66252fa61d241f8fc3b134b7fb57955b3 100644 (file)
@@ -88,8 +88,8 @@ static libusb_context *usb_context = NULL;
  * that high.
  */
 static uint64_t supported_samplerates[] = {
-       100,
-       500,
+       SR_HZ(100),
+       SR_HZ(500),
        SR_KHZ(1),
        SR_KHZ(5),
        SR_KHZ(25),
@@ -110,7 +110,9 @@ static uint64_t supported_samplerates[] = {
 };
 
 static struct sr_samplerates samplerates = {
-       0, 0, 0,
+       SR_HZ(0),
+       SR_HZ(0),
+       SR_HZ(0),
        supported_samplerates,
 };
 
index 946c5470217387cf1bcc864e0b447d248dfc74f8..db747075fc6fb75ddb4fe54b98eaeaa94f9a7a49 100644 (file)
--- a/sigrok.h
+++ b/sigrok.h
@@ -59,6 +59,7 @@ extern "C" {
 #define SR_MAX_PROBENAME_LEN   32
 
 /* Handy little macros */
+#define SR_HZ(n)  (n)
 #define SR_KHZ(n) ((n) * 1000)
 #define SR_MHZ(n) ((n) * 1000000)
 #define SR_GHZ(n) ((n) * 1000000000)