@ -688,6 +688,27 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
@@ -688,6 +688,27 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
*(int*)arg=count;
}
caseFIONWRITE:
{
intcount;
irqstate_tstate=irqsave();
/* determine the number of bytes free in the buffer */