Mercurial > ecos-v3_0-branch
comparison packages/io/serial/current/src/common/serial.c @ 88:afdeb44241de ecos-sw-2000-05-12
Merge from eCos master repository on 2000-05-12-07:47:04-BST
| author | jlarmour |
|---|---|
| date | Fri, 12 May 2000 17:53:32 +0000 |
| parents | 6512add4f5d6 |
| children | 7f461c3a372c |
comparison
equal
deleted
inserted
replaced
| 87:008177d90c43 | 88:afdeb44241de |
|---|---|
| 295 return -EINVAL; | 295 return -EINVAL; |
| 296 | 296 |
| 297 *len = sizeof(cyg_serial_buf_info_t); | 297 *len = sizeof(cyg_serial_buf_info_t); |
| 298 p = (cyg_serial_buf_info_t *)xbuf; | 298 p = (cyg_serial_buf_info_t *)xbuf; |
| 299 | 299 |
| 300 p->rx_bufsize = chan->in_cbuf.len; | 300 p->rx_bufsize = in_cbuf->len; |
| 301 if (p->rx_bufsize) { | 301 if (p->rx_bufsize) { |
| 302 p->rx_count = chan->in_cbuf.put - chan->in_cbuf.get; | 302 p->rx_count = in_cbuf->put - in_cbuf->get; |
| 303 if (p->rx_count < 0) | 303 if (p->rx_count < 0) |
| 304 p->rx_count += p->rx_bufsize; | 304 p->rx_count += p->rx_bufsize; |
| 305 } | 305 } |
| 306 else | 306 else |
| 307 p->rx_count = 0; | 307 p->rx_count = 0; |
| 308 | 308 |
| 309 p->tx_bufsize = chan->out_cbuf.len; | 309 p->tx_bufsize = out_cbuf->len; |
| 310 if (p->tx_bufsize) { | 310 if (p->tx_bufsize) { |
| 311 p->tx_count = chan->out_cbuf.put - chan->out_cbuf.get; | 311 p->tx_count = out_cbuf->put - out_cbuf->get; |
| 312 if (p->tx_count < 0) | 312 if (p->tx_count < 0) |
| 313 p->tx_count += p->tx_bufsize; | 313 p->tx_count += p->tx_bufsize; |
| 314 } | 314 } |
| 315 else | 315 else |
| 316 p->tx_count = 0; | 316 p->tx_count = 0; |
