Fix RECV status reporting
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@945 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
272f9778f9
commit
e953b2e53b
@ -203,7 +203,7 @@ static uart_dev_t g_uart1port =
|
|||||||
|
|
||||||
static inline ubyte up_serialin(struct up_dev_s *priv, int offset)
|
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)
|
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.
|
* 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
|
/* Get the current UART status and check for loop
|
||||||
* termination conditions
|
* 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;
|
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||||
ubyte rbr;
|
ubyte rbr;
|
||||||
|
|
||||||
|
*status = up_serialin(priv, LPC214X_UART_LSR_OFFSET);
|
||||||
rbr = up_serialin(priv, LPC214X_UART_RBR_OFFSET);
|
rbr = up_serialin(priv, LPC214X_UART_RBR_OFFSET);
|
||||||
*status = up_serialin(priv, LPC214X_UART_RBR_OFFSET);
|
|
||||||
return rbr;
|
return rbr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user