color refactoring

This commit is contained in:
2020-11-03 17:57:03 +01:00
parent 6bbe4d7eaf
commit 747cbd3658
4 changed files with 66 additions and 25 deletions

View File

@ -3,6 +3,14 @@
typedef enum {
LOG_HIGH,
LOG_RED,
LOG_GREEN,
LOG_BLUE
} t_logColor;
// initialize the logger, creates a ringbuffer
void logInit();
@ -12,8 +20,12 @@ void logFree();
// log a message, make sure it is a null-terminated string
// return value can be ignored, it is only used in test
int logMsg(const char *format, ...);
// in red
int errMsg(const char *format, ...);
int coloredMsg(const t_logColor color, const char *format, ...);
// reads the ringbuffer and transfers data to output channel
// call this from the idle-loop
// return value can be ignored, it is only used in test