diff options
| author | Reinhard Panhuber <[email protected]> | 2021-04-30 15:14:27 +0200 |
|---|---|---|
| committer | Reinhard Panhuber <[email protected]> | 2021-04-30 15:14:27 +0200 |
| commit | 5f88def9c9fd7e17b8765fda7dceea051a1faa85 (patch) | |
| tree | 8a6b0bbd3cd4f9c0db10ee44693958a0d878a432 /src/common | |
| parent | 14e2c004cd9db7d386beb2b91804f8e4dfea55f1 (diff) | |
Comment cleanup
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_fifo.c | 14 | ||||
| -rw-r--r-- | src/common/tusb_fifo.h | 3 |
2 files changed, 5 insertions, 12 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c index 306b68653..c80bb1497 100644 --- a/src/common/tusb_fifo.c +++ b/src/common/tusb_fifo.c @@ -884,12 +884,9 @@ void tu_fifo_advance_read_pointer(tu_fifo_t *f, uint16_t n) Returns the length and pointer from which bytes can be read in a linear manner. This is of major interest for DMA transmissions. If returned length is zero the - corresponding pointer is invalid. The returned length is limited to the number - of ITEMS n which the user wants to write into the buffer. - The write pointer does NOT get advanced, use tu_fifo_advance_read_pointer() to - do so! If the length returned is less than n i.e. len<n, then a wrap occurs - and you need to execute this function a second time to get a pointer to the - wrapped part! + corresponding pointer is invalid. + The read pointer does NOT get advanced, use tu_fifo_advance_read_pointer() to + do so! @param[in] f Pointer to FIFO @param[out] *info @@ -951,8 +948,8 @@ void tu_fifo_get_read_info(tu_fifo_t *f, tu_fifo_buffer_info_t *info) /*! @brief Get linear write info - Returns the length and pointer from which bytes can be written into buffer array in a linear manner. - This is of major interest for DMA transmissions not using circular mode. If returned length is zero the + Returns the length and pointer to which bytes can be written into FIFO in a linear manner. + This is of major interest for DMA transmissions not using circular mode. If a returned length is zero the corresponding pointer is invalid. The returned length is limited to the number of BYTES n which the user wants to write into the buffer. The write pointer does NOT get advanced, use tu_fifo_advance_write_pointer() to do so! If the length @@ -980,7 +977,6 @@ void tu_fifo_get_write_info(tu_fifo_t *f, tu_fifo_buffer_info_t *info, uint16_t return; } - // We need n here because we must enforce the read and write pointers to be not more separated than 2*depth! if (!f->overwritable) { diff --git a/src/common/tusb_fifo.h b/src/common/tusb_fifo.h index c6bcdaec5..7bc6b60b9 100644 --- a/src/common/tusb_fifo.h +++ b/src/common/tusb_fifo.h @@ -140,9 +140,6 @@ void tu_fifo_advance_read_pointer (tu_fifo_t *f, uint16_t n); // If you want to read/write from/to the FIFO by use of a DMA, you may need to conduct two copies to handle a possible wrapping part // This functions deliver a pointer to start reading/writing from/to and a valid linear length along which no wrap occurs. -// In case not all of your data is available within one read/write, update the read/write pointer by -// tu_fifo_advance_read_pointer()/tu_fifo_advance_write_pointer and conduct a second read/write operation -// TODO - update comments void tu_fifo_get_read_info(tu_fifo_t *f, tu_fifo_buffer_info_t *info); void tu_fifo_get_write_info(tu_fifo_t *f, tu_fifo_buffer_info_t *info, uint16_t n); |
