summaryrefslogtreecommitdiff
path: root/src/osal/osal_freertos.h
diff options
context:
space:
mode:
authorZixun LI <[email protected]>2026-06-22 21:46:11 +0200
committerGitHub <[email protected]>2026-06-22 21:46:11 +0200
commit33a340dbbefbf75b88d4e8055ea8814b4e55c8d3 (patch)
tree5fdd05895d8512a9f80574c826b2de93be184079 /src/osal/osal_freertos.h
parentcd3561bf158afd5a5718904b8139a338d1e3b67c (diff)
parent0d7318de1b7c711359b2fff2b70e64eb8f0c2e91 (diff)
Merge pull request #3721 from renjieah/pr-osal-spin-deinit
fix: release hardware spinlock in tud_deinit/tuh_deinit
Diffstat (limited to 'src/osal/osal_freertos.h')
-rw-r--r--src/osal/osal_freertos.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/osal/osal_freertos.h b/src/osal/osal_freertos.h
index 2f36aa9e8..128626159 100644
--- a/src/osal/osal_freertos.h
+++ b/src/osal/osal_freertos.h
@@ -130,6 +130,10 @@ TU_ATTR_ALWAYS_INLINE static inline void osal_spin_init(osal_spinlock_t *ctx) {
spinlock_initialize(ctx);
}
+TU_ATTR_ALWAYS_INLINE static inline void osal_spin_deinit(osal_spinlock_t *ctx) {
+ (void) ctx;
+}
+
TU_ATTR_ALWAYS_INLINE static inline void osal_spin_lock(osal_spinlock_t *ctx, bool in_isr) {
if (!TUP_MCU_MULTIPLE_CORE && in_isr) {
return; // single core MCU does not need to lock in ISR
@@ -152,6 +156,10 @@ TU_ATTR_ALWAYS_INLINE static inline void osal_spin_init(osal_spinlock_t *ctx) {
(void) ctx;
}
+TU_ATTR_ALWAYS_INLINE static inline void osal_spin_deinit(osal_spinlock_t *ctx) {
+ (void) ctx;
+}
+
TU_ATTR_ALWAYS_INLINE static inline void osal_spin_lock(osal_spinlock_t *ctx, bool in_isr) {
if (in_isr) {
#if TUP_MCU_MULTIPLE_CORE