Move parser to separate module and add USART_IsDataAvailable
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user