Comment cleanup
This commit is contained in:
parent
14e2c004cd
commit
5f88def9c9
|
@ -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.
|
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
|
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
|
corresponding pointer is invalid.
|
||||||
of ITEMS n which the user wants to write into the buffer.
|
The read pointer does NOT get advanced, use tu_fifo_advance_read_pointer() to
|
||||||
The write pointer does NOT get advanced, use tu_fifo_advance_read_pointer() to
|
do so!
|
||||||
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!
|
|
||||||
@param[in] f
|
@param[in] f
|
||||||
Pointer to FIFO
|
Pointer to FIFO
|
||||||
@param[out] *info
|
@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
|
@brief Get linear write info
|
||||||
|
|
||||||
Returns the length and pointer from which bytes can be written into buffer array in a linear manner.
|
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 returned length is zero the
|
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
|
corresponding pointer is invalid. The returned length is limited to the number of BYTES n which the user
|
||||||
wants to write into the buffer.
|
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
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// We need n here because we must enforce the read and write pointers to be not more separated than 2*depth!
|
// We need n here because we must enforce the read and write pointers to be not more separated than 2*depth!
|
||||||
if (!f->overwritable)
|
if (!f->overwritable)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
// 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.
|
// 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_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);
|
void tu_fifo_get_write_info(tu_fifo_t *f, tu_fifo_buffer_info_t *info, uint16_t n);
|
||||||
|
|
Loading…
Reference in New Issue