Skip to content

Commit e8b7f21

Browse files
committed
For FreeRTOS kernel-aware debugging, when queue registry is enabled, label tinyUSB queue
1 parent 70a9229 commit e8b7f21

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/osal/osal_freertos.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,16 @@ TU_ATTR_ALWAYS_INLINE static inline bool osal_mutex_unlock(osal_mutex_t mutex_hd
169169

170170
TU_ATTR_ALWAYS_INLINE static inline osal_queue_t osal_queue_create(osal_queue_def_t* qdef)
171171
{
172-
#if configSUPPORT_STATIC_ALLOCATION
173-
return xQueueCreateStatic(qdef->depth, qdef->item_sz, (uint8_t*) qdef->buf, &qdef->sq);
174-
#else
175-
return xQueueCreate(qdef->depth, qdef->item_sz);
176-
#endif
172+
osal_queue_t q;
173+
#if configSUPPORT_STATIC_ALLOCATION
174+
q = xQueueCreateStatic(qdef->depth, qdef->item_sz, (uint8_t*) qdef->buf, &qdef->sq);
175+
#else
176+
q = xQueueCreate(qdef->depth, qdef->item_sz);
177+
#endif
178+
#if defined(configQUEUE_REGISTRY_SIZE) && (configQUEUE_REGISTRY_SIZE>0)
179+
vQueueAddToRegistry(q, "tinyUSB");
180+
#endif
181+
return q;
177182
}
178183

179184
TU_ATTR_ALWAYS_INLINE static inline bool osal_queue_receive(osal_queue_t qhdl, void* data, uint32_t msec)

0 commit comments

Comments
 (0)