1.4.4 Library Interface
OSAL library provides the following interfaces:
Functions
Name | Description |
---|---|
OSAL_SEM_Create | Creates an OSAL Semaphore |
OSAL_SEM_Delete | Deletes an OSAL Semaphore |
OSAL_SEM_Pend | Waits on a semaphore. Returns true if the semaphore was obtained within the time limit |
OSAL_SEM_Post | Posts a semaphore or increments a counting semaphore |
OSAL_SEM_PostISR | Posts a semaphore or increments a counting semaphore from within an Interrupt Service Routine (ISR) |
OSAL_SEM_GetCount | Returns the current value of a counting semaphore |
OSAL_CRIT_Enter | Enters a critical section with the specified severity level |
OSAL_CRIT_Leave | Leaves a critical section with the specified severity level |
OSAL_MUTEX_Create | Creates a mutex |
OSAL_MUTEX_Delete | Deletes a mutex |
OSAL_MUTEX_Lock | Locks a mutex |
OSAL_MUTEX_Unlock | Unlocks a mutex |
OSAL_Malloc | Allocates memory using the OSAL default allocator |
OSAL_Free | Deallocates a block of memory and return to the default pool |
OSAL_Initialize | Performs OSAL initialization |
OSAL_Name | Obtains the name of the underlying RTOS |
Data types and constants
Name | Type | Description |
---|---|---|
OSAL_SEM_TYPE | Enum | Enumerated type representing the possible types of semaphore |
OSAL_CRIT_TYPE | Enum | Enumerated type representing the possible types of critical section |
OSAL_RESULT | Enum | Enumerated type representing the general return value from OSAL functions |
OSAL_SEM_DECLARE | Macro | Declares an OSAL semaphore |
OSAL_MUTEX_DECLARE | Macro | Declares an OSAL mutex |