Add HZ_TO_NS macro
This commit is contained in:
parent
c2616fb9fa
commit
3677f3ec3f
2
sigrok.h
2
sigrok.h
|
@ -59,6 +59,8 @@
|
||||||
#define MHZ(n) ((n) * 1000000)
|
#define MHZ(n) ((n) * 1000000)
|
||||||
#define GHZ(n) ((n) * 1000000000)
|
#define GHZ(n) ((n) * 1000000000)
|
||||||
|
|
||||||
|
#define HZ_TO_NS(n) (1000000000 / (n))
|
||||||
|
|
||||||
#ifndef ARRAY_SIZE
|
#ifndef ARRAY_SIZE
|
||||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue