Rewrite logging system and sync state with clients

This commit is contained in:
2024-08-28 02:32:34 +02:00
parent 481170792a
commit 9a3ae27a5f
6 changed files with 77 additions and 33 deletions

View File

@@ -1 +1,29 @@
void *TODO;
#include "common.h"
#include "serial.h"
#define PREFIX_ERROR(fmt) "Error:" fmt
static bool state;
void Info(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
USART_Print(state, "", fmt, args);
va_end(args);
}
void Error(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
USART_Print(state, "Error: ", fmt, args);
va_end(args);
}
void SetStateFlag(bool is_running)
{
state = is_running;
}