X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=sigrok-internal.h;h=d385340357c551d6323105443d49970fd975beee;hb=b08024a8363c7a019bebc05a25e2689e774326e8;hp=a5326d2b9f57304ca85e82e7b77e09b0bbc52a8b;hpb=4cea9eb20dc8d816a67c57d111a3a4529d452e4d;p=libsigrok.git diff --git a/sigrok-internal.h b/sigrok-internal.h index a5326d2b..d3853403 100644 --- a/sigrok-internal.h +++ b/sigrok-internal.h @@ -20,6 +20,8 @@ #ifndef SIGROK_SIGROK_INTERNAL_H #define SIGROK_SIGROK_INTERNAL_H +#include + /*--- Macros ----------------------------------------------------------------*/ #ifndef ARRAY_SIZE @@ -30,10 +32,28 @@ #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 -----------------------------------------------------------------*/ + +/* Log levels for sr_log() and friends. */ +#define SR_LOG_NONE 0 +#define SR_LOG_DBG 1 +#define SR_LOG_INFO 2 +#define SR_LOG_WARN 3 +#define SR_LOG_ERR 4 + +int sr_log(int loglevel, 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);