add osal_queue_send_isr/osal_semaphore_post_isr for better support freeRTOS
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user