summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-03-27 10:47:10 +0700
committerGitHub <[email protected]>2025-03-27 10:47:10 +0700
commit8c1802e41d37c915334a19b859b24cb2a1b48ee5 (patch)
treed159c6f13f7c4815622b83fb736377d1c090e4d9 /src/common
parentcf76af1056e9a3019d9b08503b783a86602374f0 (diff)
parent5531de4f2c7e725b95f23083aad7d68d0d95b586 (diff)
Merge pull request #3043 from hathach/hcd-close-ep
feat(host) add endpoint close API and feat(HIL) improvement
Diffstat (limited to 'src/common')
-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);