2016-11-16 00:15:07 +02:00
|
|
|
#include <avr/io.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "../lib/andygock_avr-uart/uart.h"
|
|
|
|
|
|
|
|
int uart0_putchar(char c, FILE *stream)
|
|
|
|
{
|
|
|
|
(void) stream;
|
|
|
|
|
|
|
|
if (c == '\n') {
|
|
|
|
uart0_putchar('\r', stream);
|
|
|
|
}
|
|
|
|
|
|
|
|
uart0_putc(c);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int uart3_putchar(char c, FILE *stream)
|
|
|
|
{
|
|
|
|
(void) stream;
|
|
|
|
|
|
|
|
if (c == '\n') {
|
|
|
|
uart3_putchar('\r', stream);
|
|
|
|
}
|
|
|
|
|
|
|
|
uart3_putc(c);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int uart0_getchar(FILE *stream)
|
|
|
|
{
|
|
|
|
(void) stream;
|
2016-12-01 14:22:40 +02:00
|
|
|
return uart0_getc() & 0xff;
|
2016-11-16 00:15:07 +02:00
|
|
|
}
|