diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-19 19:40:03 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-19 19:40:03 +0000 |
commit | 2c29060ddf970e21f429904207405e2bb8d23482 (patch) | |
tree | 3b0e978d99ac6fa2a075f1ab0c936ab1f9406b91 /nuttx/arch/arm/src/lpc214x/lpc214x_serial.c | |
parent | d56fc4681310fd7870b86a363748fb93369bb81e (diff) | |
download | px4-nuttx-2c29060ddf970e21f429904207405e2bb8d23482.tar.gz px4-nuttx-2c29060ddf970e21f429904207405e2bb8d23482.tar.bz2 px4-nuttx-2c29060ddf970e21f429904207405e2bb8d23482.zip |
Fix RECV status reporting
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@945 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc214x/lpc214x_serial.c')
-rw-r--r-- | nuttx/arch/arm/src/lpc214x/lpc214x_serial.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c index 3b9f0e04c..84de77ff5 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c @@ -203,7 +203,7 @@ static uart_dev_t g_uart1port = static inline ubyte up_serialin(struct up_dev_s *priv, int offset) { - return getreg16(priv->uartbase + offset); + return getreg8(priv->uartbase + offset); } /**************************************************************************** @@ -212,7 +212,7 @@ static inline ubyte up_serialin(struct up_dev_s *priv, int offset) static inline void up_serialout(struct up_dev_s *priv, int offset, ubyte value) { - putreg16(value, priv->uartbase + offset); + putreg8(value, priv->uartbase + offset); } /**************************************************************************** @@ -464,7 +464,7 @@ static int up_interrupt(int irq, void *context) * until we have been looping for a long time. */ - for( passes = 0; passes < 256; passes++) + for (passes = 0; passes < 256; passes++) { /* Get the current UART status and check for loop * termination conditions @@ -613,8 +613,8 @@ static int up_receive(struct uart_dev_s *dev, uint32 *status) struct up_dev_s *priv = (struct up_dev_s*)dev->priv; ubyte rbr; + *status = up_serialin(priv, LPC214X_UART_LSR_OFFSET); rbr = up_serialin(priv, LPC214X_UART_RBR_OFFSET); - *status = up_serialin(priv, LPC214X_UART_RBR_OFFSET); return rbr; } |