summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-12-12 00:27:20 +0700
committerhathach <[email protected]>2025-12-12 00:27:20 +0700
commit711879b2f1bcb122c084e6a8bc93c5d2c599ab84 (patch)
tree15389fe812ec3964ab4957f37a25706dd9e9ff3b /src/common
parentc7f7dc6ee1f4f56ccb86adabb2ca3f14c212e985 (diff)
remove bitfield in usbd_device_t state to reduce code size
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_fifo.c6
-rw-r--r--src/common/tusb_fifo.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c
index 1fca1fd32..ef787c6e6 100644
--- a/src/common/tusb_fifo.c
+++ b/src/common/tusb_fifo.c
@@ -96,9 +96,9 @@ void tu_fifo_clear(tu_fifo_t *f) {
}
// Change the fifo overwritable mode
-bool tu_fifo_set_overwritable(tu_fifo_t *f, bool overwritable) {
+void tu_fifo_set_overwritable(tu_fifo_t *f, bool overwritable) {
if (f->overwritable == overwritable) {
- return true;
+ return;
}
ff_lock(f->mutex_wr);
@@ -108,8 +108,6 @@ bool tu_fifo_set_overwritable(tu_fifo_t *f, bool overwritable) {
ff_unlock(f->mutex_wr);
ff_unlock(f->mutex_rd);
-
- return true;
}
//--------------------------------------------------------------------+
diff --git a/src/common/tusb_fifo.h b/src/common/tusb_fifo.h
index 26ac38073..f13c195e5 100644
--- a/src/common/tusb_fifo.h
+++ b/src/common/tusb_fifo.h
@@ -157,7 +157,7 @@ typedef enum {
// Setup API
//--------------------------------------------------------------------+
bool tu_fifo_config(tu_fifo_t *f, void *buffer, uint16_t depth, uint16_t item_size, bool overwritable);
-bool tu_fifo_set_overwritable(tu_fifo_t *f, bool overwritable);
+void tu_fifo_set_overwritable(tu_fifo_t *f, bool overwritable);
void tu_fifo_clear(tu_fifo_t *f);
#if OSAL_MUTEX_REQUIRED