46 #ifdef USING_OS_FREERTOS
51 typedef SemaphoreHandle_t mutex_t;
53 typedef SemaphoreHandle_t semaphore_t;
58 typedef uint8_t mutex_t;
60 typedef volatile uint8_t semaphore_t;
65 #define OSIF_WAIT_FOREVER 0xFFFFFFFFu
73 #if defined (__cplusplus)
104 const uint32_t timeout);
147 const uint32_t timeout);
171 const uint8_t initValue);
184 #if defined (__cplusplus)
status_t OSIF_MutexDestroy(const mutex_t *const pMutex)
Destroys a previously created mutex.
status_t OSIF_SemaDestroy(const semaphore_t *const pSem)
Destroys a previously created semaphore.
void OSIF_TimeDelay(const uint32_t delay)
Delays execution for a number of milliseconds.
status_t OSIF_MutexUnlock(const mutex_t *const pMutex)
Unlocks a previously locked mutex.
status_t OSIF_MutexLock(const mutex_t *const pMutex, const uint32_t timeout)
Waits for a mutex and locks it.
uint32_t OSIF_GetMilliseconds(void)
Returns the number of miliseconds elapsed since starting the internal timer or starting the scheduler...
status_t OSIF_SemaCreate(semaphore_t *const pSem, const uint8_t initValue)
Creates a semaphore with a given value.
status_t OSIF_MutexCreate(mutex_t *const pMutex)
Create an unlocked mutex.
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
status_t OSIF_SemaWait(semaphore_t *const pSem, const uint32_t timeout)
Decrement a semaphore with timeout.
status_t OSIF_SemaPost(semaphore_t *const pSem)
Increment a semaphore.