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:
patacongo 2011-05-12 23:51:04 +00:00
parent dffa7f5293
commit eb21a852a8

View File

@ -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,8 +502,9 @@ static void up_txint(struct uart_dev_s *dev, bool enable)
}
else {
ier &= ~COM_IER_TEI;
}
outb(base+COM_IER, ier);
}
irqrestore(flags);
}
/****************************************************************************