summaryrefslogtreecommitdiff
path: root/tinyusb
diff options
context:
space:
mode:
authorhathach <[email protected]>2014-03-19 17:26:35 +0700
committerhathach <[email protected]>2014-03-19 17:26:35 +0700
commit7a57428f3e5f3f134daf891da6d43ee036417762 (patch)
tree221feb856cf43eed8369ced1d180e51eb95296c7 /tinyusb
parent61657f6751ce96dd2b0c260729061ac0eb2adab4 (diff)
reduce memory use by cmsis rtx
able to run with IAR host cmsis rtx
Diffstat (limited to 'tinyusb')
-rw-r--r--tinyusb/osal/osal_cmsis_rtx.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tinyusb/osal/osal_cmsis_rtx.h b/tinyusb/osal/osal_cmsis_rtx.h
index 3e6297eeb..cdeef61c3 100644
--- a/tinyusb/osal/osal_cmsis_rtx.h
+++ b/tinyusb/osal/osal_cmsis_rtx.h
@@ -158,12 +158,12 @@ typedef osal_queue_t * osal_queue_handle_t;
#define OSAL_QUEUE_DEF(name, queue_depth, type)\
osMailQDef(name, queue_depth, type);
-#define OSAL_QUEUE_REF(name) osMailQ(name)
+#define OSAL_QUEUE_REF(name) ((osal_queue_t*) osMailQ(name))
static inline osal_queue_handle_t osal_queue_create(osal_queue_t * const p_queue) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline osal_queue_handle_t osal_queue_create(osal_queue_t * const p_queue)
{
- return (NULL != osMailCreate(p_queue, NULL)) ? p_queue : NULL;
+ return (NULL != osMailCreate( (osMailQDef_t const *) p_queue, NULL)) ? p_queue : NULL;
}
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;