diff options
Diffstat (limited to 'nuttx/drivers/serial.c')
-rw-r--r-- | nuttx/drivers/serial.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nuttx/drivers/serial.c b/nuttx/drivers/serial.c index 153ee431d..2f0f5703f 100644 --- a/nuttx/drivers/serial.c +++ b/nuttx/drivers/serial.c @@ -344,14 +344,22 @@ static int uart_close(struct file *filep) while (dev->xmit.head != dev->xmit.tail) { +#ifndef CONFIG_DISABLE_SIGNALS usleep(500*1000); +#else + up_udelay(500*1000); +#endif } /* And wait for the TX fifo to drain */ while (!uart_txempty(dev)) { +#ifndef CONFIG_DISABLE_SIGNALS usleep(500*1000); +#else + up_udelay(500*1000); +#endif } /* Free the IRQ and disable the UART */ |