23 #define OSAL_INFINITE_TIME 0xFFFFFFFF 35 typedef void*( *OSAL_task_entry_point_t)(
void *args);
65 #include "osal_portmacro.h" 67 #ifndef OSAL_task_stack_declare 68 #error "osal_portmacro.h doesn't define OSAL_task_stack_declare() macro." void * OSAL_mutex_handle_t
OS mutex handle.
OSAL_status_t
return code list
OSAL_status_t OSAL_mutex_delete(OSAL_mutex_handle_t *handle)
Delete an OS mutex.
OSAL_status_t OSAL_binary_semaphore_give(OSAL_binary_semaphore_handle_t *handle)
Give operation on OS binary semaphore. Increase the binary semaphore count value by 1 and unblock the...
OSAL_status_t OSAL_mutex_take(OSAL_mutex_handle_t *handle, uint32_t timeout)
Take operation on OS mutex.
OSAL_status_t OSAL_sleep(uint32_t milliseconds)
Asleep the current task during specified number of milliseconds.
void * OSAL_binary_semaphore_handle_t
OS binary semaphore handle.
OSAL_status_t OSAL_mutex_create(uint8_t *name, OSAL_mutex_handle_t *handle)
Create an OS mutex.
OSAL_status_t OSAL_task_delete(OSAL_task_handle_t *handle)
Delete an OS task and start it.
void * OSAL_task_handle_t
OS task handle.
OSAL_status_t OSAL_counter_semaphore_delete(OSAL_counter_semaphore_handle_t *handle)
Delete an OS counter semaphore.
OSAL_status_t OSAL_queue_post(OSAL_queue_handle_t *handle, void *msg)
Post a message in an OS queue.
OSAL_status_t OSAL_task_create(OSAL_task_entry_point_t entry_point, uint8_t *name, OSAL_task_stack_t stack, int32_t priority, void *parameters, OSAL_task_handle_t *handle)
Create an OS task and start it.
void * OSAL_counter_semaphore_handle_t
OS counter semaphore handle.
OSAL_status_t OSAL_enable_context_switching(void)
Reenable the OS scheduling that was disabled by OSAL_disable_context_switching. This method may be ca...
OSAL_status_t OSAL_disable_context_switching(void)
Disable the OS scheduler context switching. Prevent the OS from scheduling the current thread calling...
OSAL_status_t OSAL_queue_fetch(OSAL_queue_handle_t *handle, void **msg, uint32_t timeout)
Fetch a message from an OS queue. Blocks until a message arrived or a timeout occurred.
OSAL_status_t OSAL_binary_semaphore_take(OSAL_binary_semaphore_handle_t *handle, uint32_t timeout)
Take operation on OS binary semaphore. Block the current task until binary semaphore become available...
OSAL_status_t OSAL_binary_semaphore_delete(OSAL_binary_semaphore_handle_t *handle)
Delete an OS binary semaphore.
OSAL_status_t OSAL_binary_semaphore_create(uint8_t *name, uint32_t initial_count, OSAL_binary_semaphore_handle_t *handle)
Create an OS binary semaphore with a semaphore count initial value (0 or 1).
void * OSAL_queue_handle_t
OS queue handle.
OSAL_status_t OSAL_queue_create(uint8_t *name, uint32_t size, OSAL_queue_handle_t *handle)
Create an OS queue with a predefined queue size.
OSAL_status_t OSAL_counter_semaphore_create(uint8_t *name, uint32_t initial_count, uint32_t max_count, OSAL_counter_semaphore_handle_t *handle)
Create an OS counter semaphore with a semaphore count initial value.
void *(* OSAL_task_entry_point_t)(void *args)
task function entry point
OSAL_status_t OSAL_queue_delete(OSAL_queue_handle_t *handle)
Delete an OS queue.
OSAL_status_t OSAL_counter_semaphore_take(OSAL_counter_semaphore_handle_t *handle, uint32_t timeout)
Take operation on OS counter semaphore. Block the current task until counter semaphore become availab...
OSAL_status_t OSAL_counter_semaphore_give(OSAL_counter_semaphore_handle_t *handle)
Give operation on OS counter semaphore. Increase the counter semaphore count value by 1 and unblock t...
OSAL_status_t OSAL_mutex_give(OSAL_mutex_handle_t *handle)
Give operation on OS mutex.