X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src-avr%2Fao_serial_avr.c;h=2fe39755487a6f18c22b27770326fafbc03c4607;hb=557522e447448023d7869c0fa15ed8337db7e1b8;hp=5c098f0b6f65816fca814be5d65b13b3a4c5610e;hpb=ce78906727aa59fc2b91f0fde4c7186b037359ff;p=fw%2Faltos diff --git a/src-avr/ao_serial_avr.c b/src-avr/ao_serial_avr.c index 5c098f0b..2fe39755 100644 --- a/src-avr/ao_serial_avr.c +++ b/src-avr/ao_serial_avr.c @@ -20,6 +20,15 @@ __xdata struct ao_fifo ao_usart1_rx_fifo; __xdata struct ao_fifo ao_usart1_tx_fifo; +void +ao_debug_out(char c) +{ + if (c == '\n') + ao_debug_out('\r'); + loop_until_bit_is_set(UCSR1A, UDRE1); + UDR1 = c; +} + ISR(USART1_RX_vect) { if (!ao_fifo_full(ao_usart1_rx_fifo)) @@ -145,6 +154,7 @@ ao_serial_init(void) (1 << TXEN1) | /* Enable transmitter */ (1 << RXCIE1) | /* Enable receive interrupts */ (1 << UDRIE1)); /* Enable transmit empty interrupts */ +#if 0 #if USE_SERIAL_STDIN int8_t i; i = ao_add_stdio(ao_serial_pollchar, @@ -152,4 +162,5 @@ ao_serial_init(void) NULL); printf("Register serial stdio as %d\n", i); #endif +#endif }