change osal_timeout_t to uint32_t
implement osal_tick_get & osal_tick_tock for osal_none implement timeout for osal_semaphore_wait
This commit is contained in:
@@ -74,8 +74,6 @@
|
||||
|
||||
#include "osal_common.h"
|
||||
|
||||
typedef uint32_t osal_timeout_t;
|
||||
|
||||
//------------- Tick -------------//
|
||||
uint32_t osal_tick_get(void);
|
||||
|
||||
@@ -94,7 +92,7 @@ tusb_error_t osal_task_create(osal_task_t *task);
|
||||
typedef uint32_t osal_semaphore_t;
|
||||
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, osal_timeout_t msec, tusb_error_t *p_error);
|
||||
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);
|
||||
|
||||
//------------- Queue -------------//
|
||||
@@ -105,7 +103,7 @@ typedef void* osal_queue_handle_t;
|
||||
osal_queue_t name
|
||||
|
||||
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, osal_timeout_t msec, tusb_error_t *p_error);
|
||||
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);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user