Fix initiali interrupt issue

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@947 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-09-20 16:24:14 +00:00
parent 130667fa1d
commit fd831038f6
1 changed files with 9 additions and 2 deletions

View File

@ -61,8 +61,6 @@
* Definitions
****************************************************************************/
#define BASE_BAUD 38400
/****************************************************************************
* Private Types
****************************************************************************/
@ -356,6 +354,15 @@ static int up_setup(struct uart_dev_s *dev)
up_serialout(priv, LPC214X_UART_FCR_OFFSET,
(LPC214X_FCR_FIFO_TRIG8|LPC214X_FCR_TX_FIFO_RESET|\
LPC214X_FCR_RX_FIFO_RESET|LPC214X_FCR_FIFO_ENABLE));
/* The NuttX serial driver waits for the first THRE interrrupt before
* sending serial data... However, it appears that the lpc214x hardware
* does not generate that interrupt until a transition from not-empty
* to empty. So, the current kludge here is to send one NULL at
* startup to kick things off.
*/
up_serialout(priv, LPC214X_UART_THR_OFFSET, '\0');
#endif
return OK;
}