2018-01-29 20:29:02 +01:00
|
|
|
#include "uart_tx.h"
|
|
|
|
#include "uart.h"
|
|
|
|
#include <avr/io.h>
|
|
|
|
#include <avr/interrupt.h>
|
|
|
|
|
|
|
|
void __attribute__ ((naked)) __attribute__ ((section (".init6"))) uart_tx_init() {
|
2018-04-05 00:35:09 +02:00
|
|
|
UCSRB |= (1<<TXEN);
|
2018-01-29 20:29:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void uart_putc(unsigned char c) {
|
2018-04-05 00:35:09 +02:00
|
|
|
while( ( UCSRA & ( 1 << UDRE ) ) == 0 ) {}
|
|
|
|
UDR = c;
|
2018-01-29 20:29:02 +01:00
|
|
|
}
|