X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=sigrok-internal.h;h=d9352f62a6c75bbf057de713be5b8a1bd4abb833;hb=baf1d71477ea5c1dea449bc9ce72b39d02751934;hp=b30d417dd1cda8e8154e020fda89708a2d2bdf30;hpb=22b02383442ec55a11cc6dd2b4c467d1de0b5bd2;p=libsigrok.git diff --git a/sigrok-internal.h b/sigrok-internal.h index b30d417d..d9352f62 100644 --- a/sigrok-internal.h +++ b/sigrok-internal.h @@ -20,6 +20,34 @@ #ifndef SIGROK_SIGROK_INTERNAL_H #define SIGROK_SIGROK_INTERNAL_H +#include + +/*--- Macros ----------------------------------------------------------------*/ + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) +#endif + +#ifndef ARRAY_AND_SIZE +#define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a) +#endif + +/* Size of a datastore chunk in units */ +#define DATASTORE_CHUNKSIZE 512000 + +/*--- hwplugin.c ------------------------------------------------------------*/ + +int load_hwplugins(void); + +/*--- log.c -----------------------------------------------------------------*/ + +int sr_log(int loglevel, const char *format, ...); +int sr_spew(const char *format, ...); +int sr_dbg(const char *format, ...); +int sr_info(const char *format, ...); +int sr_warn(const char *format, ...); +int sr_err(const char *format, ...); + /*--- hardware/common/serial.c ----------------------------------------------*/ GSList *list_serial_ports(void);