Add SR_HZ macro for consistency.
This commit is contained in:
parent
59df0c77e2
commit
c91404191e
|
@ -59,7 +59,7 @@ static uint64_t supported_samplerates[] = {
|
||||||
static struct sr_samplerates samplerates = {
|
static struct sr_samplerates samplerates = {
|
||||||
SR_KHZ(200),
|
SR_KHZ(200),
|
||||||
SR_MHZ(200),
|
SR_MHZ(200),
|
||||||
0,
|
SR_HZ(0),
|
||||||
supported_samplerates,
|
supported_samplerates,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,9 @@ static int capabilities[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sr_samplerates samplerates = {
|
static struct sr_samplerates samplerates = {
|
||||||
1,
|
SR_HZ(1),
|
||||||
SR_GHZ(1),
|
SR_GHZ(1),
|
||||||
1,
|
SR_HZ(1),
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -47,9 +47,9 @@ static int capabilities[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint64_t supported_samplerates[] = {
|
static uint64_t supported_samplerates[] = {
|
||||||
100,
|
SR_HZ(100),
|
||||||
200,
|
SR_HZ(200),
|
||||||
500,
|
SR_HZ(500),
|
||||||
SR_KHZ(1),
|
SR_KHZ(1),
|
||||||
SR_KHZ(2),
|
SR_KHZ(2),
|
||||||
SR_KHZ(5),
|
SR_KHZ(5),
|
||||||
|
@ -71,9 +71,9 @@ static uint64_t supported_samplerates[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sr_samplerates samplerates = {
|
static struct sr_samplerates samplerates = {
|
||||||
100,
|
SR_HZ(100),
|
||||||
SR_MHZ(200),
|
SR_MHZ(200),
|
||||||
0,
|
SR_HZ(0),
|
||||||
supported_samplerates,
|
supported_samplerates,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -92,10 +92,10 @@ static int capabilities[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sr_samplerates samplerates = {
|
static struct sr_samplerates samplerates = {
|
||||||
10,
|
SR_HZ(10),
|
||||||
SR_MHZ(200),
|
SR_MHZ(200),
|
||||||
1,
|
SR_HZ(1),
|
||||||
0,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* List of struct sr_serial_device_instance */
|
/* List of struct sr_serial_device_instance */
|
||||||
|
|
|
@ -89,7 +89,7 @@ static uint64_t supported_samplerates[] = {
|
||||||
static struct sr_samplerates samplerates = {
|
static struct sr_samplerates samplerates = {
|
||||||
SR_KHZ(200),
|
SR_KHZ(200),
|
||||||
SR_MHZ(24),
|
SR_MHZ(24),
|
||||||
0,
|
SR_HZ(0),
|
||||||
supported_samplerates,
|
supported_samplerates,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -88,8 +88,8 @@ static libusb_context *usb_context = NULL;
|
||||||
* that high.
|
* that high.
|
||||||
*/
|
*/
|
||||||
static uint64_t supported_samplerates[] = {
|
static uint64_t supported_samplerates[] = {
|
||||||
100,
|
SR_HZ(100),
|
||||||
500,
|
SR_HZ(500),
|
||||||
SR_KHZ(1),
|
SR_KHZ(1),
|
||||||
SR_KHZ(5),
|
SR_KHZ(5),
|
||||||
SR_KHZ(25),
|
SR_KHZ(25),
|
||||||
|
@ -110,7 +110,9 @@ static uint64_t supported_samplerates[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sr_samplerates samplerates = {
|
static struct sr_samplerates samplerates = {
|
||||||
0, 0, 0,
|
SR_HZ(0),
|
||||||
|
SR_HZ(0),
|
||||||
|
SR_HZ(0),
|
||||||
supported_samplerates,
|
supported_samplerates,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
1
sigrok.h
1
sigrok.h
|
@ -59,6 +59,7 @@ extern "C" {
|
||||||
#define SR_MAX_PROBENAME_LEN 32
|
#define SR_MAX_PROBENAME_LEN 32
|
||||||
|
|
||||||
/* Handy little macros */
|
/* Handy little macros */
|
||||||
|
#define SR_HZ(n) (n)
|
||||||
#define SR_KHZ(n) ((n) * 1000)
|
#define SR_KHZ(n) ((n) * 1000)
|
||||||
#define SR_MHZ(n) ((n) * 1000000)
|
#define SR_MHZ(n) ((n) * 1000000)
|
||||||
#define SR_GHZ(n) ((n) * 1000000000)
|
#define SR_GHZ(n) ((n) * 1000000000)
|
||||||
|
|
Loading…
Reference in New Issue