From d7ae21203c1a7915c397157a9d231264ff0e66fc Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 21 May 2013 17:57:21 +0700 Subject: fix issue with osal_none queue def --- tinyusb/osal/osal_none.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tinyusb/osal') diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h index e542e519a..07ebd1f99 100644 --- a/tinyusb/osal/osal_none.h +++ b/tinyusb/osal/osal_none.h @@ -216,7 +216,7 @@ typedef osal_queue_t * osal_queue_handle_t; // use to declare a queue, within the scope of tinyusb, should only use primitive type only #define OSAL_QUEUE_DEF(name, queue_depth, type)\ - uint32_t name##_buffer[queue_depth];\ + type name##_buffer[queue_depth];\ osal_queue_t name = {\ .buffer = name##_buffer,\ .depth = queue_depth,\ @@ -230,6 +230,7 @@ static inline osal_queue_handle_t osal_queue_create(osal_queue_t * const p_queue return (osal_queue_handle_t) p_queue; } +// TODO move to osal_none.c // when queue is full, it will overwrite the oldest data in the queue static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, void const * data) ATTR_ALWAYS_INLINE; static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, void const * data) -- cgit v1.3.1