diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-13 14:46:10 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-13 14:46:10 +0000 |
commit | 10aab8f04fd291da1e69fe73d5135ad5d81987ff (patch) | |
tree | 6ccab08c299522b6a5300545127d2bbc7b2dbacc /nuttx | |
parent | bbf465bc540b4b277421b12e1d2b998d2114f849 (diff) | |
download | px4-nuttx-10aab8f04fd291da1e69fe73d5135ad5d81987ff.tar.gz px4-nuttx-10aab8f04fd291da1e69fe73d5135ad5d81987ff.tar.bz2 px4-nuttx-10aab8f04fd291da1e69fe73d5135ad5d81987ff.zip |
updated comments
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1220 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/drivers/serialirq.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nuttx/drivers/serialirq.c b/nuttx/drivers/serialirq.c index ba859c2ef..f7503e4cc 100644 --- a/nuttx/drivers/serialirq.c +++ b/nuttx/drivers/serialirq.c @@ -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) |