diff options
| author | hathach <[email protected]> | 2025-12-12 12:43:12 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-12-12 12:43:12 +0700 |
| commit | e65e79bb81fcc87e5bb6c1ef83b39d480c785764 (patch) | |
| tree | 378896204d38391eca2cdf6bc32dcf00df46fc44 /src/common/tusb_fifo.h | |
| parent | d71e3c9ea61b1d2ab8e60daeb299abfdf828541e (diff) | |
add back tu_fifo_discard_n() since it may be useful in the future.
Diffstat (limited to 'src/common/tusb_fifo.h')
| -rw-r--r-- | src/common/tusb_fifo.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/tusb_fifo.h b/src/common/tusb_fifo.h index f13c195e5..2e2a0db6f 100644 --- a/src/common/tusb_fifo.h +++ b/src/common/tusb_fifo.h @@ -205,6 +205,10 @@ TU_ATTR_ALWAYS_INLINE static inline uint16_t tu_fifo_read_n(tu_fifo_t *f, void * return tu_fifo_read_n_access_mode(f, buffer, n, TU_FIFO_INC_ADDR_RW8); } +// discard first n items from fifo i.e advance read pointer by n with mutex +// return number of discarded items +uint16_t tu_fifo_discard_n(tu_fifo_t *f, uint16_t n); + //--------------------------------------------------------------------+ // Write API //--------------------------------------------------------------------+ |
