18 #define F_CPU 16000000UL
21 #define UART_BAUD 57600
37 #if F_CPU < 2000000UL && defined(U2X)
43 UCSR0B = _BV(TXEN0) | _BV(RXEN0);
56 fputs(
"*ring*\n", stderr);
62 loop_until_bit_is_set(UCSR0A, UDRE0);
112 loop_until_bit_is_set(UCSR0A, RXC0);
113 if (UCSR0A & _BV(FE0))
115 if (UCSR0A & _BV(DOR0))
131 if ((c >= (uint8_t)
' ' && c <= (uint8_t)
'\x7e') ||
132 c >= (uint8_t)
'\xa0')
162 for (cp2 = b; cp2 < cp; cp2++)
177 while (cp > b && cp[-1] !=
' ')
int uart_putchar(char c, FILE *stream)
int uart_getchar(FILE *stream)