summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-11-26 08:46:31 +0700
committerGitHub <[email protected]>2025-11-26 08:46:31 +0700
commit38842491bb55260c0cc7d7709abe5b0e73a0de61 (patch)
tree6a792bef3c31d1504ccd55c6687fa2f1b8d76b91 /src
parent8205b6094fa7147204334b5b6c69d12ae5656a5d (diff)
parent3f0d2668f1acbda95fa6d8b341c6ade8b56ee02b (diff)
Merge pull request #3369 from hathach/misc_fix
Few misc fixes
Diffstat (limited to 'src')
-rw-r--r--src/common/tusb_fifo.h4
-rw-r--r--src/portable/st/stm32_fsdev/fsdev_stm32.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/common/tusb_fifo.h b/src/common/tusb_fifo.h
index 9d8b864e9..2fb4f37d4 100644
--- a/src/common/tusb_fifo.h
+++ b/src/common/tusb_fifo.h
@@ -175,7 +175,9 @@ bool tu_fifo_full(const tu_fifo_t *f);
bool tu_fifo_overflowed(const tu_fifo_t *f);
TU_ATTR_ALWAYS_INLINE static inline bool tu_fifo_empty(const tu_fifo_t *f) {
- return f->wr_idx == f->rd_idx;
+ uint16_t wr_idx = f->wr_idx;
+ uint16_t rd_idx = f->rd_idx;
+ return wr_idx == rd_idx;
}
TU_ATTR_ALWAYS_INLINE static inline uint16_t tu_fifo_depth(const tu_fifo_t *f) {
diff --git a/src/portable/st/stm32_fsdev/fsdev_stm32.h b/src/portable/st/stm32_fsdev/fsdev_stm32.h
index 30ffadc35..e7a57aca0 100644
--- a/src/portable/st/stm32_fsdev/fsdev_stm32.h
+++ b/src/portable/st/stm32_fsdev/fsdev_stm32.h
@@ -202,8 +202,7 @@
#include "stm32u0xx.h"
#define FSDEV_PMA_SIZE (1024u)
#define FSDEV_BUS_32BIT
- // Disable SBUF_ISO on U0 for now due to bad performance (audio glitching)
- #define FSDEV_HAS_SBUF_ISO 0
+ #define FSDEV_HAS_SBUF_ISO 1
#define USB USB_DRD_FS
#define USB_EP_CTR_RX USB_EP_VTRX