updated comments
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1220 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
eebd2150ef
commit
e9b004b360
@ -84,13 +84,21 @@ void uart_xmitchars(FAR uart_dev_t *dev)
|
||||
|
||||
while (dev->xmit.head != dev->xmit.tail && uart_txready(dev))
|
||||
{
|
||||
/* Send the next byte */
|
||||
|
||||
uart_send(dev, dev->xmit.buffer[dev->xmit.tail]);
|
||||
|
||||
/* Increment the tail index */
|
||||
|
||||
if (++(dev->xmit.tail) >= dev->xmit.size)
|
||||
{
|
||||
dev->xmit.tail = 0;
|
||||
}
|
||||
|
||||
/* A byte was removed from the buffer. Inform any waiters
|
||||
* there there is space available.
|
||||
*/
|
||||
|
||||
if (dev->xmitwaiting)
|
||||
{
|
||||
dev->xmitwaiting = FALSE;
|
||||
@ -139,7 +147,7 @@ void uart_recvchars(FAR uart_dev_t *dev)
|
||||
|
||||
dev->recv.buffer[dev->recv.head] = uart_receive(dev, &status);
|
||||
|
||||
/* Increment the index */
|
||||
/* Increment the head index */
|
||||
|
||||
dev->recv.head = nexthead;
|
||||
if (++nexthead >= dev->recv.size)
|
||||
|
Loading…
Reference in New Issue
Block a user