src-avr: Add ADC routines to telescience
[fw/altos] / src-avr / ao_serial_avr.c
index 5c098f0b6f65816fca814be5d65b13b3a4c5610e..2fe39755487a6f18c22b27770326fafbc03c4607 100644 (file)
 __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
 }