Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Babyseat_NewFirmware_copy_sean by
Diff: inc/adi_sense_log.h
- Branch:
- gd_dbg2142
- Revision:
- 32:119f86d3d9ed
- Parent:
- 29:57edca10d78c
--- a/inc/adi_sense_log.h	Fri Jun 22 09:29:24 2018 +0100
+++ b/inc/adi_sense_log.h	Wed Jul 18 19:01:56 2018 +0000
@@ -51,12 +51,21 @@
  *  @{
  */
 
+#define HRED_TEXT "\033""[1;31m"
+#define HGREEN_TEXT "\033""[1;32m"
+#define HBLUE_TEXT "\033""[1;36m"
+#define RED_TEXT "\033""[0;31m"
+#define GREEN_TEXT "\033""[0;32m"
+#define BLUE_TEXT "\033""[1;34m"
+#define YELLOW_TEXT "\033""[0;33m"
+#define NORMAL_TEXT "\033""[0m"
+
 /*! Macro function for logging an error message */
 #define ADI_SENSE_LOG_ERROR(...)                                        \
-    adi_sense_Log(ADI_SENSE_LOG_LEVEL_ERROR, "[ERROR] " __VA_ARGS__)
+    adi_sense_Log(ADI_SENSE_LOG_LEVEL_ERROR, HRED_TEXT"[ERROR] " __VA_ARGS__)
 /*! Macro function for logging a warning message */
 #define ADI_SENSE_LOG_WARN(...)  \
-    adi_sense_Log(ADI_SENSE_LOG_LEVEL_WARN,  "[WARN] "  __VA_ARGS__)
+    adi_sense_Log(ADI_SENSE_LOG_LEVEL_WARN, YELLOW_TEXT"[WARN] "  __VA_ARGS__)
 /*! Macro function for logging an information message */
 #define ADI_SENSE_LOG_INFO(...)  \
     adi_sense_Log(ADI_SENSE_LOG_LEVEL_INFO,  "[INFO] "  __VA_ARGS__)
@@ -118,6 +127,11 @@
     const char          * format,
     ...);
 
+/*
+ * Print a log message to the platform log interface without \n
+ */
+void adi_sense_Print(const char* format, ...);
+
 #ifdef __cplusplus
 }
 #endif
    