Move parser to separate module and add USART_IsDataAvailable

This commit is contained in:
2024-08-27 15:09:06 +02:00
parent c716137e1a
commit e64880f66c
5 changed files with 65 additions and 51 deletions

View File

@@ -1,8 +1,8 @@
#include "serial.h"
#include "common.h"
#include "serial.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdio.h>
#include <avr/io.h>
#include <avr/interrupt.h>
@@ -66,6 +66,11 @@ void USART_Printf(const char *fmt, ...)
}
}
bool USART_IsDataAvailable(void)
{
return rxhead != rxtail;
}
// Interrupt Handler
ISR(USART_RXC_vect)
{