mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-29 01:20:19 +00:00
remove tu_fifo_backward_write/read_pointer API
since it is illegal from fifo perspective
This commit is contained in:
parent
2468f9e26d
commit
893919a848
@ -893,48 +893,6 @@ void tu_fifo_advance_read_pointer(tu_fifo_t *f, uint16_t n)
|
||||
f->rd_idx = advance_pointer(f, f->rd_idx, n);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/*!
|
||||
@brief Move back write pointer - intended to be used in combination with DMA.
|
||||
It is possible to fill the FIFO by use of a DMA in circular mode. Within
|
||||
DMA ISRs you may update the write pointer to be able to read from the FIFO.
|
||||
As long as the DMA is the only process writing into the FIFO this is safe
|
||||
to use.
|
||||
|
||||
USE WITH CARE - WE DO NOT CONDUCT SAFTY CHECKS HERE!
|
||||
|
||||
@param[in] f
|
||||
Pointer to the FIFO buffer to manipulate
|
||||
@param[in] n
|
||||
Number of items the write pointer moves backward
|
||||
*/
|
||||
/******************************************************************************/
|
||||
void tu_fifo_backward_write_pointer(tu_fifo_t *f, uint16_t n)
|
||||
{
|
||||
f->wr_idx = backward_pointer(f, f->wr_idx, n);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/*!
|
||||
@brief Move back read pointer - intended to be used in combination with DMA.
|
||||
It is possible to read from the FIFO by use of a DMA in linear mode. Within
|
||||
DMA ISRs you may update the read pointer to be able to again write into the
|
||||
FIFO. As long as the DMA is the only process reading from the FIFO this is
|
||||
safe to use.
|
||||
|
||||
USE WITH CARE - WE DO NOT CONDUCT SAFTY CHECKS HERE!
|
||||
|
||||
@param[in] f
|
||||
Pointer to the FIFO buffer to manipulate
|
||||
@param[in] n
|
||||
Number of items the read pointer moves backward
|
||||
*/
|
||||
/******************************************************************************/
|
||||
void tu_fifo_backward_read_pointer(tu_fifo_t *f, uint16_t n)
|
||||
{
|
||||
f->rd_idx = backward_pointer(f, f->rd_idx, n);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/*!
|
||||
@brief Get linear read info
|
||||
|
@ -128,9 +128,7 @@ void tu_fifo_correct_read_pointer (tu_fifo_t* f);
|
||||
// Pointer modifications intended to be used in combinations with DMAs.
|
||||
// USE WITH CARE - NO SAFTY CHECKS CONDUCTED HERE! NOT MUTEX PROTECTED!
|
||||
void tu_fifo_advance_write_pointer (tu_fifo_t *f, uint16_t n);
|
||||
void tu_fifo_backward_write_pointer (tu_fifo_t *f, uint16_t n);
|
||||
void tu_fifo_advance_read_pointer (tu_fifo_t *f, uint16_t n);
|
||||
void tu_fifo_backward_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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user