avr-firmwares/drivers/uart_rx_async.c
Ain 8f1f80bea3 Fix uart_rx_init
This also renames it to make multiple rx facilities cause an symbol duplication
error.
2018-01-29 19:42:15 +00:00

18 lines
357 B
C

#include "uart_rx_async.h"
#include "uart.h"
#include <avr/io.h>
#include <avr/interrupt.h>
void __attribute__ ((naked)) __attribute__ ((section (".init6"))) uart_rx_init() {
UCSR0B |= (1<<RXEN0) | (1<<RXCIE0);
}
void __attribute__ ((naked)) __attribute__ ((section (".init8"))) uart_rx_sei() {
sei();
}
ISR(USART_RX_vect) {
uart_process(UDR0);
}