30 lines
421 B
C
30 lines
421 B
C
#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;
|
|
}
|