Skip to content
Snippets Groups Projects
Commit b5efb9dd authored by Gregory Nutt's avatar Gregory Nutt
Browse files

Add serial method so that lower half driver can provide RX flow control...

Add serial method so that lower half driver can provide RX flow control information.  From Jussi Kivilinna
parent 7594d8b8
No related branches found
No related tags found
No related merge requests found
......@@ -763,6 +763,17 @@ static ssize_t uart_read(FAR struct file *filep, FAR char *buffer, size_t buflen
}
}
#ifdef CONFIG_SERIAL_IFLOWCONTROL
if (dev->recv.head == dev->recv.tail)
{
/* We might leave Rx interrupt disabled if full recv buffer was read
* empty. Enable Rx interrupt to make sure that more input is received.
*/
uart_enablerxint(dev);
}
#endif
uart_givesem(&dev->recv.sem);
return recvd;
}
......
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