diff options
| author | Keith Packard <keithp@keithp.com> | 2011-04-01 14:12:56 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2011-04-01 14:12:56 -0700 | 
| commit | 92386f2e8419c4df125692cc998eb72ec49bf991 (patch) | |
| tree | 4dadad9e2e07205d7854671e03ed508e17520c38 /src/ao_serial.c | |
| parent | 9f8a96a8516e13878b329dbf1da855ed9a3219c4 (diff) | |
altos: Clean up usage of serial port for stdio
Code wanting to use this must invoke ao_add_stdio; that way
the link can be configured before command processing starts.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_serial.c')
| -rw-r--r-- | src/ao_serial.c | 25 | 
1 files changed, 1 insertions, 24 deletions
diff --git a/src/ao_serial.c b/src/ao_serial.c index e9373e23..dc68f862 100644 --- a/src/ao_serial.c +++ b/src/ao_serial.c @@ -20,10 +20,6 @@  volatile __xdata struct ao_fifo	ao_usart1_rx_fifo;  volatile __xdata struct ao_fifo	ao_usart1_tx_fifo; -#if USE_SERIAL_STDIN -__pdata uint8_t	ao_serial_stdin; -#endif -  void  ao_serial_rx1_isr(void) __interrupt 3  { @@ -31,8 +27,7 @@ ao_serial_rx1_isr(void) __interrupt 3  		ao_fifo_insert(ao_usart1_rx_fifo, U1DBUF);  	ao_wakeup(&ao_usart1_rx_fifo);  #if USE_SERIAL_STDIN -	if (ao_serial_stdin) -		ao_wakeup(&ao_stdin_ready); +	ao_wakeup(&ao_stdin_ready);  #endif  } @@ -73,22 +68,11 @@ char  ao_serial_pollchar(void) __critical  {  	char	c; -#if 0 -	if (!ao_serial_stdin) -		return AO_READ_AGAIN; -#endif  	if (ao_fifo_empty(ao_usart1_rx_fifo))  		return AO_READ_AGAIN;  	ao_fifo_remove(ao_usart1_rx_fifo,c);  	return c;  } - -void -ao_serial_set_stdin(uint8_t stdin) -{ -	ao_serial_stdin = stdin; -} -  #endif  void @@ -168,11 +152,4 @@ ao_serial_init(void)  	IEN0 |= IEN0_URX1IE;  	IEN2 |= IEN2_UTX1IE; -#if 0 -#if USE_SERIAL_STDIN -	ao_add_stdio(ao_serial_pollchar, -		     ao_serial_putchar, -		     NULL); -#endif -#endif  }  | 
