Implement USART with bot RX and TX interrupts

This commit is contained in:
2024-09-02 01:03:59 +02:00
parent 2423e0f060
commit 19983fb613
17 changed files with 168 additions and 440 deletions

24
src/common/common.c Normal file
View File

@@ -0,0 +1,24 @@
#include "common.h"
#include "bus/usart.h"
#include <stdio.h>
static void Puts(const char *str)
{
while (*str) {
USART_Putc(*str++);
}
}
void Info(const char *fmt, ...)
{
va_list ap;
char msg[256];
va_start(ap, fmt);
vsnprintf(msg, sizeof(msg), fmt, ap);
va_end(ap);
Puts("[CORE] ");
Puts(msg);
Puts("\r\n");
}