change osal_queue_send(osal_queue_handle_t const queue_hdl, uint32_t data) signature to osal_queue_send(osal_queue_handle_t const queue_hdl, const void * data)

- support any size queue message (instead of fixed uint32_t)
This commit is contained in:
hathach
2013-04-10 01:13:31 +07:00
parent e6a44b3fe9
commit e14aa4197d
8 changed files with 62 additions and 27 deletions

View File

@@ -126,11 +126,11 @@ static inline void osal_queue_receive (osal_queue_handle_t const queue_hdl, uint
(*p_error) = ( xQueueReceive(queue_hdl, p_data, osal_tick_from_msec(msec)) == pdPASS ) ? TUSB_ERROR_NONE : TUSB_ERROR_OSAL_TIMEOUT;
}
static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, uint32_t data) ATTR_ALWAYS_INLINE;
static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, uint32_t data)
static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, const void * data) ATTR_ALWAYS_INLINE;
static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, const void * data)
{
portBASE_TYPE taskWaken;
return ( xQueueSendFromISR(queue_hdl, &data, &taskWaken) == pdTRUE ) ? TUSB_ERROR_NONE : TUSB_ERROR_OSAL_QUEUE_FAILED;
return ( xQueueSendFromISR(queue_hdl, data, &taskWaken) == pdTRUE ) ? TUSB_ERROR_NONE : TUSB_ERROR_OSAL_QUEUE_FAILED;
}
#ifdef __cplusplus