diff options
| author | Jan Dümpelmann <[email protected]> | 2020-09-03 17:21:32 +0200 |
|---|---|---|
| committer | Jan Dümpelmann <[email protected]> | 2020-09-03 17:21:32 +0200 |
| commit | 4071e490e259de5bf2891c9893ab7965b5be3d2e (patch) | |
| tree | ee77036e6c12e13aaf8a7527c6e4c19c8cc9a9be /src/common/tusb_fifo.c | |
| parent | fd6cf9010b522019a4434ebd02fb447b567e7131 (diff) | |
New function to modify fifo overwritability
Diffstat (limited to 'src/common/tusb_fifo.c')
| -rw-r--r-- | src/common/tusb_fifo.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c index 6ab158cca..fdd8c3e35 100644 --- a/src/common/tusb_fifo.c +++ b/src/common/tusb_fifo.c @@ -319,3 +319,22 @@ bool tu_fifo_clear(tu_fifo_t *f) return true; } + +/******************************************************************************/ +/*! + @brief Change the fifo mode to overwritable or not overwritable + + @param[in] f + Pointer to the FIFO buffer to manipulate +*/ +/******************************************************************************/ +bool tu_fifo_change_mode(tu_fifo_t *f, bool overwritable) +{ + tu_fifo_lock(f); + + f->overwritable = overwritable; + + tu_fifo_unlock(f); + + return true; +} |
