1
0
forked from fsfw/fsfw

added stdio pinters

This commit is contained in:
2021-01-03 01:02:07 +01:00
parent 7759b19961
commit b30405fee7
4 changed files with 149 additions and 3 deletions

View File

@ -0,0 +1,33 @@
#include <stdio.h>
namespace fsfw {
enum class PrintLevel {
NONE = 0,
//! Strange error when using just ERROR..
ERROR_TYPE = 1,
WARNING = 2,
INFO = 3,
DEBUG = 4
};
static const char* const ANSI_COLOR_RED = "\x1b[31m";
static const char* const ANSI_COLOR_GREEN = "\x1b[32m";
static const char* const ANSI_COLOR_YELLOW = "\x1b[33m";
static const char* const ANSI_COLOR_BLUE = "\x1b[34m";
static const char* const ANSI_COLOR_MAGENTA = "\x1b[35m";
static const char* const ANSI_COLOR_CYAN = "\x1b[36m";
static const char* const ANSI_COLOR_RESET = "\x1b[0m";
void setPrintLevel(PrintLevel printLevel);
PrintLevel getPrintLevel();
void printInfo(const char *fmt, ...);
void printWarning(const char* fmt, ...);
void printDebug(const char* fmt, ...);
void printError(const char* fmt, ...);
}