Fix com.c logic error
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3600 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
fd69ba1da6
commit
3e1e4f6876
@ -485,11 +485,14 @@ static void up_txint(struct uart_dev_s *dev, bool enable)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
uint16_t base = priv->base;
|
||||
irqstate_t flags;
|
||||
uint8_t ier;
|
||||
|
||||
flags = irqsave();
|
||||
ier = inb(base+COM_IER);
|
||||
if (enable) {
|
||||
ier |= COM_IER_TEI;
|
||||
outb(base+COM_IER, ier);
|
||||
|
||||
/* Fake a TX interrupt here by just calling uart_xmitchars() with
|
||||
* interrupts disabled (note this may recurse).
|
||||
@ -499,9 +502,10 @@ static void up_txint(struct uart_dev_s *dev, bool enable)
|
||||
}
|
||||
else {
|
||||
ier &= ~COM_IER_TEI;
|
||||
}
|
||||
outb(base+COM_IER, ier);
|
||||
}
|
||||
irqrestore(flags);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_txready
|
||||
|
Loading…
x
Reference in New Issue
Block a user