Skip to content
Snippets Groups Projects
Commit f4102d3a authored by Jakob Olsson's avatar Jakob Olsson
Browse files

lib_commons: add a a lib_debug_print macro

Decision to keep a separate library debug level and macro and application debug level and application\nwas made to keep the library completely independent of any application.
parent 8c72224e
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,17 @@
#define HARDWARE_VERSION_Z "hardware_version"
#define HARDWARE_VERSION_H ""
#define HARDWARE_VERSION "hardware_version"
/*! @brief A macro for printing debug messages only if \<debug\> is true. */
#define lib_debug_print(...) \
do { \
if (lib_debug) \
fprintf(stderr, __VA_ARGS__); \
} while (0)
/*! @brief Variable used by debug_print, defined and initiated in dongle.c */
extern int lib_debug;
/**
* Struct used for parsing the curl response from the dongle.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment