This is not libsigrok-specific and should not be part of our API.
#include <glib.h>
#include <libusb.h>
#include <sigrok.h>
+#include <sigrok-internal.h>
#include "analyzer.h"
#define USB_VENDOR 0x0c12
#ifndef SIGROK_SIGROK_INTERNAL_H
#define SIGROK_SIGROK_INTERNAL_H
+/*--- 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
+
/*--- hwplugin.c ------------------------------------------------------------*/
int load_hwplugins(void);
#define HZ_TO_NS(n) (1000000000 / (n))
-#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
-
typedef int (*sr_receive_data_callback) (int fd, int revents, void *user_data);
/* Data types used by hardware plugins for set_configuration() */