summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-03-05 21:47:41 +0700
committerGitHub <[email protected]>2026-03-05 21:47:41 +0700
commit97476872aa841fcd9cd622e4082d6c57b183c67f (patch)
tree232aca150cd4c890457b363bfcbfba9ff9a656cd /src/common
parentae3864d21f2b206ae41d1d424b96fea0ac7e0dc6 (diff)
parent75a5bedf357342762688a3fecc90739f58bbff0e (diff)
Merge pull request #3378 from hathach/dwc2_deinit
Add DWC2 deinit support
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_fifo.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/tusb_fifo.h b/src/common/tusb_fifo.h
index 86ba59059..a3829e38e 100644
--- a/src/common/tusb_fifo.h
+++ b/src/common/tusb_fifo.h
@@ -289,6 +289,12 @@ TU_ATTR_ALWAYS_INLINE static inline bool tu_fifo_empty(const tu_fifo_t *f) {
return wr_idx == rd_idx;
}
+// Suppress IAR warning
+// Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement
+#if defined(__ICCARM__)
+#pragma diag_suppress = Pa082
+#endif
+
// return number of items in fifo, capped to fifo's depth
TU_ATTR_ALWAYS_INLINE static inline uint16_t tu_fifo_count(const tu_fifo_t *f) {
return tu_min16(tu_ff_overflow_count(f->depth, f->wr_idx, f->rd_idx), f->depth);
@@ -303,6 +309,10 @@ TU_ATTR_ALWAYS_INLINE static inline uint16_t tu_fifo_remaining(const tu_fifo_t *
return tu_ff_remaining_local(f->depth, f->wr_idx, f->rd_idx);
}
+#if defined(__ICCARM__)
+ #pragma diag_default=Pa082
+#endif
+
#ifdef __cplusplus
}
#endif