add semaphore reset & queue flush API for osal

add semaphore reset when opening control pipe
This commit is contained in:
hathach
2013-03-12 00:10:52 +07:00
parent 8eaad2326b
commit 38ff7123b4
4 changed files with 21 additions and 4 deletions

View File

@@ -153,6 +153,7 @@ typedef void* osal_semaphore_handle_t;
osal_semaphore_handle_t osal_semaphore_create(osal_semaphore_t * const sem);
void osal_semaphore_wait(osal_semaphore_handle_t const sem_hdl, uint32_t msec, tusb_error_t *p_error);
tusb_error_t osal_semaphore_post(osal_semaphore_handle_t const sem_hdl);
void osal_semaphore_reset(osal_semaphore_handle_t const sem_hdl);
//--------------------------------------------------------------------+
// QUEUE API
@@ -166,6 +167,7 @@ typedef void* osal_queue_handle_t;
osal_queue_handle_t osal_queue_create (osal_queue_t *p_queue);
void osal_queue_receive (osal_queue_handle_t const queue_hdl, uint32_t *p_data, uint32_t msec, tusb_error_t *p_error);
tusb_error_t osal_queue_send (osal_queue_handle_t const queue_hdl, uint32_t data);
void osal_queue_flush(osal_queue_handle_t const queue_hdl);
//--------------------------------------------------------------------+
// TICK API