Feature/make pretty apps and ports (#80)
* Added pretty-apps and pretty-ports make targets * pretty-fied apps folder C files * Pretty-fied ports folder C and H files Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -24,11 +24,10 @@ void uart_init(void)
|
||||
#endif
|
||||
|
||||
UCSR0C = _BV(UCSZ01) | _BV(UCSZ00); /* 8-bit data */
|
||||
UCSR0B = _BV(RXEN0) | _BV(TXEN0); /* Enable RX and TX */
|
||||
UCSR0B = _BV(RXEN0) | _BV(TXEN0); /* Enable RX and TX */
|
||||
}
|
||||
|
||||
void uart_putchar(char c,
|
||||
FILE * stream)
|
||||
void uart_putchar(char c, FILE *stream)
|
||||
{
|
||||
if (c == '\n') {
|
||||
uart_putchar('\r', stream);
|
||||
@@ -37,8 +36,8 @@ void uart_putchar(char c,
|
||||
UDR0 = c;
|
||||
}
|
||||
|
||||
char uart_getchar(FILE * stream)
|
||||
char uart_getchar(FILE *stream)
|
||||
{
|
||||
loop_until_bit_is_set(UCSR0A, RXC0); /* Wait until data exists. */
|
||||
loop_until_bit_is_set(UCSR0A, RXC0); /* Wait until data exists. */
|
||||
return UDR0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user