summaryrefslogtreecommitdiff
path: root/tinyusb/osal
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-05-17 13:49:38 +0700
committerhathach <[email protected]>2018-05-17 13:49:38 +0700
commit013bd621f5f16fabc1acfd4fb896d98af41fe152 (patch)
treede49938405b51a8cb1bd43c809867061ccd26852 /tinyusb/osal
parentb253291314a8859a2ef4f6f1622bedba93887ecf (diff)
add osal_queue_send_isr/osal_semaphore_post_isr for better support freeRTOS
Diffstat (limited to 'tinyusb/osal')
-rw-r--r--tinyusb/osal/osal_none.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h
index b79816130..bea90093c 100644
--- a/tinyusb/osal/osal_none.h
+++ b/tinyusb/osal/osal_none.h
@@ -146,7 +146,7 @@ static inline osal_queue_t osal_queue_create(uint32_t depth, uint32_t item_size)
}
-static inline bool osal_queue_send(osal_queue_t const queue_hdl, void const * data)
+static inline bool osal_queue_send_isr(osal_queue_t const queue_hdl, void const * data)
{
return fifo_write( (fifo_t*) queue_hdl, data);
}
@@ -197,6 +197,8 @@ static inline osal_semaphore_t osal_semaphore_create(uint32_t max_count, uint32_
return sem_data;
}
+#define osal_semaphore_post_isr osal_semaphore_post
+
static inline bool osal_semaphore_post(osal_semaphore_t sem_hdl)
{
if (sem_hdl->count < sem_hdl->max_count ) sem_hdl->count++;