diff options
| author | Dave Nadler <[email protected]> | 2023-06-28 17:25:22 -0400 |
|---|---|---|
| committer | Dave Nadler <[email protected]> | 2023-06-28 17:25:22 -0400 |
| commit | 11fba59319d81fb9502fbf399abb4fe27cf3fa29 (patch) | |
| tree | 4dde34cae2f10d95fdcb9c057a4702b52b897fa1 /src/osal | |
| parent | cca4be6c67e1084d57cc42a917a2c07678182c6e (diff) | |
Name queues for easier FreeRTOS debugging with task- and queue-aware debuggers
Diffstat (limited to 'src/osal')
| -rw-r--r-- | src/osal/osal_freertos.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osal/osal_freertos.h b/src/osal/osal_freertos.h index 0b1b11589..e83277eb3 100644 --- a/src/osal/osal_freertos.h +++ b/src/osal/osal_freertos.h @@ -56,7 +56,7 @@ typedef SemaphoreHandle_t osal_mutex_t; // _int_set is not used with an RTOS #define OSAL_QUEUE_DEF(_int_set, _name, _depth, _type) \ static _type _name##_##buf[_depth];\ - osal_queue_def_t _name = { .depth = _depth, .item_sz = sizeof(_type), .buf = _name##_##buf }; + osal_queue_def_t _name = { .depth = _depth, .item_sz = sizeof(_type), .buf = _name##_##buf, .pQueueName = #_name }; typedef struct { @@ -66,6 +66,7 @@ typedef struct #if configSUPPORT_STATIC_ALLOCATION StaticQueue_t sq; #endif + const char* pQueueName; }osal_queue_def_t; typedef QueueHandle_t osal_queue_t; @@ -176,7 +177,7 @@ TU_ATTR_ALWAYS_INLINE static inline osal_queue_t osal_queue_create(osal_queue_de q = xQueueCreate(qdef->depth, qdef->item_sz); #endif #if defined(configQUEUE_REGISTRY_SIZE) && (configQUEUE_REGISTRY_SIZE>0) - vQueueAddToRegistry(q, "tinyUSB"); + vQueueAddToRegistry(q, qdef->pQueueName); #endif return q; } |
