2018-07-13 15:56:37 +02:00
|
|
|
#ifndef OS_RTEMS_MUTEX_H_
|
|
|
|
#define OS_RTEMS_MUTEX_H_
|
|
|
|
|
|
|
|
#include <framework/ipc/MutexIF.h>
|
|
|
|
|
2020-05-18 20:35:13 +02:00
|
|
|
extern "C" {
|
|
|
|
#include <freertos/FreeRTOS.h>
|
|
|
|
#include <freertos/semphr.h>
|
|
|
|
}
|
2018-07-13 15:56:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
class Mutex : public MutexIF {
|
|
|
|
public:
|
|
|
|
Mutex();
|
|
|
|
~Mutex();
|
|
|
|
ReturnValue_t lockMutex(uint32_t timeoutMs);
|
|
|
|
ReturnValue_t unlockMutex();
|
|
|
|
private:
|
|
|
|
SemaphoreHandle_t handle;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* OS_RTEMS_MUTEX_H_ */
|