2018-01-29 01:50:22 +01:00
|
|
|
#include "uart_rx_async.h"
|
|
|
|
#include "uart.h"
|
|
|
|
#include <avr/io.h>
|
|
|
|
#include <avr/interrupt.h>
|
|
|
|
|
2018-01-29 20:42:09 +01:00
|
|
|
void __attribute__ ((naked)) __attribute__ ((section (".init6"))) uart_rx_init() {
|
|
|
|
UCSR0B |= (1<<RXEN0) | (1<<RXCIE0);
|
2018-01-29 01:50:22 +01:00
|
|
|
}
|
|
|
|
|
2018-01-29 20:42:09 +01:00
|
|
|
|
2018-01-29 01:50:22 +01:00
|
|
|
void __attribute__ ((naked)) __attribute__ ((section (".init8"))) uart_rx_sei() {
|
|
|
|
sei();
|
|
|
|
}
|
|
|
|
|
|
|
|
ISR(USART_RX_vect) {
|
|
|
|
uart_process(UDR0);
|
|
|
|
}
|