kopia lustrzana https://github.com/mobilinkd/NucleoTNC
Add TNC_DEBUG macro because STMCubeIDE defines DEBUG macro.
rodzic
a42b1e2fbc
commit
305663cc8f
|
@ -21,7 +21,7 @@ extern "C" {
|
|||
void log_(int level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
|
||||
|
||||
#ifndef KISS_LOG_LEVEL
|
||||
#define KISS_LOG_LEVEL 2
|
||||
#define KISS_LOG_LEVEL 1
|
||||
#endif
|
||||
|
||||
#ifdef KISS_LOGGING
|
||||
|
@ -29,12 +29,14 @@ void log_(int level, const char *fmt, ...) __attribute__((format(printf, 2, 3)))
|
|||
#define LOG(level, ...) if(level >= KISS_LOG_LEVEL) log_(level, __VA_ARGS__);
|
||||
|
||||
#define DEBUG(...) LOG(0, __VA_ARGS__)
|
||||
#define TNC_DEBUG(...) LOG(0, __VA_ARGS__)
|
||||
#define INFO(...) LOG(1, __VA_ARGS__)
|
||||
#define WARN(...) LOG(2, __VA_ARGS__)
|
||||
#define ERROR(...) LOG(3, __VA_ARGS__)
|
||||
#define SEVERE(...) LOG(4, __VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG(...)
|
||||
#define TNC_DEBUG(...)
|
||||
#define INFO(...)
|
||||
#define WARN(...)
|
||||
#define ERROR(...)
|
||||
|
|
Ładowanie…
Reference in New Issue