summaryrefslogtreecommitdiff
path: root/src/common/tusb_fifo.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-07-02 18:18:52 +0700
committerhathach <[email protected]>2025-07-02 18:18:52 +0700
commitcf3966efd9fc552d641ea1e76e5aaad3ace3afd2 (patch)
treed59add439dcbfcd6e2cd9fec9aaecc413e5b5509 /src/common/tusb_fifo.c
parentf10467e711017fb05a6e0ee496e451e2e8834549 (diff)
parent963971c6aa14411f0cc6f0c4f727d199c738e2a5 (diff)
Merge branch 'master' into fork/HiFiPhile/dcd_notif
Diffstat (limited to 'src/common/tusb_fifo.c')
-rw-r--r--src/common/tusb_fifo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c
index 5f2dcabad..ecf002b09 100644
--- a/src/common/tusb_fifo.c
+++ b/src/common/tusb_fifo.c
@@ -916,8 +916,11 @@ bool tu_fifo_clear(tu_fifo_t *f)
Overwritable mode the fifo is set to
*/
/******************************************************************************/
-bool tu_fifo_set_overwritable(tu_fifo_t *f, bool overwritable)
-{
+bool tu_fifo_set_overwritable(tu_fifo_t *f, bool overwritable) {
+ if (f->overwritable == overwritable) {
+ return true;
+ }
+
_ff_lock(f->mutex_wr);
_ff_lock(f->mutex_rd);