diff options
| author | hathach <[email protected]> | 2013-04-27 16:40:18 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-04-27 16:40:18 +0700 |
| commit | 38172d3d3c6ed429377b808ad6f11eb087a0bdec (patch) | |
| tree | ef37d8e4069e774ade837e25074756cd4bc6535b /tinyusb | |
| parent | 4db386525f0df0d7a17266da1607f5d9ce820b72 (diff) | |
fix bug with osal_queue for freeRTOS
implement process mouser report to clarify mouse app task
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/osal/osal_freeRTOS.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tinyusb/osal/osal_freeRTOS.h b/tinyusb/osal/osal_freeRTOS.h index c54bb2ead..32a4fca7f 100644 --- a/tinyusb/osal/osal_freeRTOS.h +++ b/tinyusb/osal/osal_freeRTOS.h @@ -167,18 +167,20 @@ static inline void osal_semaphore_reset(osal_semaphore_handle_t const sem_hdl) // QUEUE API //--------------------------------------------------------------------+ typedef struct{ - uint8_t const depth ; ///< buffer size + uint8_t const depth; ///< buffer size + uint8_t const item_size; ///< size of each item } osal_queue_t; typedef xQueueHandle osal_queue_handle_t; #define OSAL_QUEUE_DEF(name, queue_depth, type)\ osal_queue_t name = {\ - .depth = queue_depth\ + .depth = queue_depth,\ + .item_size = sizeof(type)\ } #define osal_queue_create(p_queue) \ - xQueueCreate((p_queue)->depth, sizeof(uint32_t)) + xQueueCreate((p_queue)->depth, (p_queue)->item_size) static inline void osal_queue_receive (osal_queue_handle_t const queue_hdl, void *p_data, uint32_t msec, tusb_error_t *p_error) ATTR_ALWAYS_INLINE; static inline void osal_queue_receive (osal_queue_handle_t const queue_hdl, void *p_data, uint32_t msec, tusb_error_t *p_error) |
