Skip to content
Snippets Groups Projects
Commit 3e1e4f68 authored by patacongo's avatar patacongo
Browse files

Fix com.c logic error

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3600 42af7a65-404d-4744-a932-0658087f49c3
parent fd69ba1d
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
outb(base+COM_IER, ier);
irqrestore(flags);
}
/****************************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment