X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=sigrok.h;h=9109201d51df6e04079c0db4bda484b449345ee0;hb=d078d2e5f3842b1915ffa9961654f3aa4ed88e17;hp=6eeca9a3c9ff1617ed707204398d9bcce2361338;hpb=4cea9eb20dc8d816a67c57d111a3a4529d452e4d;p=libsigrok.git diff --git a/sigrok.h b/sigrok.h index 6eeca9a3..9109201d 100644 --- a/sigrok.h +++ b/sigrok.h @@ -55,16 +55,16 @@ extern "C" { #define SR_ERR_MALLOC -2 /* Malloc/calloc/realloc error */ #define SR_ERR_SAMPLERATE -3 /* Incorrect samplerate */ -/* limited by uint64_t */ -#define MAX_NUM_PROBES 64 -#define MAX_PROBENAME_LEN 32 +#define SR_MAX_NUM_PROBES 64 /* Limited by uint64_t. */ +#define SR_MAX_PROBENAME_LEN 32 /* Handy little macros */ -#define KHZ(n) ((n) * 1000) -#define MHZ(n) ((n) * 1000000) -#define GHZ(n) ((n) * 1000000000) +#define SR_HZ(n) (n) +#define SR_KHZ(n) ((n) * 1000) +#define SR_MHZ(n) ((n) * 1000000) +#define SR_GHZ(n) ((n) * 1000000000) -#define HZ_TO_NS(n) (1000000000 / (n)) +#define SR_HZ_TO_NS(n) (1000000000 / (n)) typedef int (*sr_receive_data_callback) (int fd, int revents, void *user_data); @@ -164,9 +164,6 @@ struct sr_analyzer { */ }; -/* Size of a chunk in units */ -#define DATASTORE_CHUNKSIZE 512000 - struct sr_datastore { /* Size in bytes of the number of units stored in this datastore */ int ds_unitsize;