Implement USART with bot RX and TX interrupts
This commit is contained in:
24
src/common/common.c
Normal file
24
src/common/common.c
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user