@ -660,9 +660,9 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
@@ -660,9 +660,9 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
intret=dev->ops->ioctl(filep,cmd,arg);
/* Append any higher level TTY flags */
/* If the low-level handler didn't handle the call, see if we can handle it here */
if(ret==OK)
if(ret==-ENOTTY)
{
switch(cmd)
{
@ -686,8 +686,43 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
@@ -686,8 +686,43 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
irqrestore(state);
*(int*)arg=count;
ret=0;
break;
}
caseFIONWRITE:
{
intcount;
irqstate_tstate=irqsave();
/* determine the number of bytes free in the buffer */