diff options
| author | Keith Packard <keithp@keithp.com> | 2011-05-19 23:43:17 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2011-05-19 23:43:17 -0700 | 
| commit | 8fcd9ccf458abf4f85729a48ae789f38cdc1b9ca (patch) | |
| tree | bdc0f3f5246b292f61b21ed0f7125a0e172e2d08 /src-avr/ao_serial_avr.c | |
| parent | 08c00b439dd2ebe0924e7d5fee519ec8d869151e (diff) | |
src-avr: Add telescience build target
No serial output, just USB
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src-avr/ao_serial_avr.c')
| -rw-r--r-- | src-avr/ao_serial_avr.c | 11 | 
1 files changed, 11 insertions, 0 deletions
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  }  | 
