20 lines
427 B
C
20 lines
427 B
C
|
#include "pico/stdlib.h"
|
||
|
|
||
|
#define LOG_MAX_MESSAGE_SIZE 64
|
||
|
|
||
|
#define LOG_ERROR_MEMORY_FULL 1
|
||
|
#define LOG_ERROR_CACHE_OVERFLOW 2
|
||
|
|
||
|
enum Log_level{
|
||
|
TELEPLOT, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
|
||
|
};
|
||
|
|
||
|
struct Log_message_data{
|
||
|
char message[LOG_MAX_MESSAGE_SIZE];
|
||
|
enum Log_level log_level;
|
||
|
uint32_t timestamp;
|
||
|
};
|
||
|
|
||
|
void Log_init(void);
|
||
|
void Log_gestion(void);
|
||
|
void Log_message(char * message, enum Log_level log_level);
|