altos/avr: Register stdio handler when using serial for stdin
authorKeith Packard <keithp@keithp.com>
Tue, 11 Oct 2011 23:44:02 +0000 (17:44 -0600)
committerKeith Packard <keithp@keithp.com>
Tue, 11 Oct 2011 23:44:02 +0000 (17:44 -0600)
This code was left in a bit of a mess; just clean it up.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/avr/ao_serial_avr.c

index 2fe39755487a6f18c22b27770326fafbc03c4607..6885c339092be28f1cbbf51e3d60b90e3a9f74b4 100644 (file)
@@ -154,13 +154,9 @@ 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,
-                        ao_serial_putchar,
-                        NULL);
-       printf("Register serial stdio as %d\n", i);
-#endif
+       ao_add_stdio(ao_serial_pollchar,
+                    ao_serial_putchar,
+                    NULL);
 #endif
 }