summaryrefslogtreecommitdiff
path: root/firmware/os/algos/calibration/util/cal_log.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/os/algos/calibration/util/cal_log.h')
-rw-r--r--firmware/os/algos/calibration/util/cal_log.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/firmware/os/algos/calibration/util/cal_log.h b/firmware/os/algos/calibration/util/cal_log.h
index dca59fdf..64f70f8e 100644
--- a/firmware/os/algos/calibration/util/cal_log.h
+++ b/firmware/os/algos/calibration/util/cal_log.h
@@ -1,6 +1,3 @@
-#ifndef LOCATION_LBS_CONTEXTHUB_NANOAPPS_CALIBRATION_UTIL_CAL_LOG_H_
-#define LOCATION_LBS_CONTEXTHUB_NANOAPPS_CALIBRATION_UTIL_CAL_LOG_H_
-
/*
* Copyright (C) 2016 The Android Open Source Project
*
@@ -22,16 +19,23 @@
* Logging macros for printing formatted strings to Nanohub.
*/
///////////////////////////////////////////////////////////////
+#ifndef LOCATION_LBS_CONTEXTHUB_NANOAPPS_CALIBRATION_UTIL_CAL_LOG_H_
+#define LOCATION_LBS_CONTEXTHUB_NANOAPPS_CALIBRATION_UTIL_CAL_LOG_H_
-
-#ifndef LOG_FUNC
-#include <seos.h>
-#define LOG_FUNC(level, fmt, ...) osLog(level, fmt, ##__VA_ARGS__)
-#define LOGD_TAG(tag, fmt, ...) \
- LOG_FUNC(LOG_DEBUG, "%s " fmt "\n", tag, ##__VA_ARGS__)
-#endif
-
-#define CAL_DEBUG_LOG LOGD_TAG
+#ifdef GCC_DEBUG_LOG
+# include <stdio.h>
+# define CAL_DEBUG_LOG(tag, fmt, ...) \
+ printf("%s " fmt "\n", tag, ##__VA_ARGS__);
+#else // GCC_DEBUG_LOG
+# include <seos.h>
+# ifndef LOG_FUNC
+# define LOG_FUNC(level, fmt, ...) osLog(level, fmt, ##__VA_ARGS__)
+# endif // LOG_FUNC
+# define LOGD_TAG(tag, fmt, ...) \
+ LOG_FUNC(LOG_DEBUG, "%s " fmt "\n", tag, ##__VA_ARGS__)
+# define CAL_DEBUG_LOG(tag, fmt, ...) \
+ osLog(LOG_DEBUG, "%s " fmt, tag, ##__VA_ARGS__);
+#endif // GCC_DEBUG_LOG
#ifdef __cplusplus
extern "C" {