freertos includes in extern "C"

This commit is contained in:
Robin Müller 2020-04-22 19:42:42 +02:00
parent fb9a5678fc
commit 9f7f8073f1
3 changed files with 10 additions and 3 deletions

View File

@ -7,8 +7,11 @@
#include <framework/osal/FreeRTOS/TaskManagement.h> #include <framework/osal/FreeRTOS/TaskManagement.h>
#include <framework/serviceinterface/ServiceInterfaceStream.h> #include <framework/serviceinterface/ServiceInterfaceStream.h>
extern "C" {
#include "portmacro.h" #include "portmacro.h"
#include "task.h" #include "task.h"
}
BinarySemaphore::BinarySemaphore() { BinarySemaphore::BinarySemaphore() {
xSemaphoreCreateBinary(handle); xSemaphoreCreateBinary(handle);

View File

@ -7,8 +7,12 @@
#define FRAMEWORK_OSAL_FREERTOS_BINARYSEMPAHORE_H_ #define FRAMEWORK_OSAL_FREERTOS_BINARYSEMPAHORE_H_
#include <framework/returnvalues/HasReturnvaluesIF.h> #include <framework/returnvalues/HasReturnvaluesIF.h>
#include <FreeRTOS.h>
extern "C" {
#include "FreeRTOS.h"
#include "semphr.h" #include "semphr.h"
}
/** /**
* @brief OS Tool to achieve synchronization of between tasks or between task and ISR * @brief OS Tool to achieve synchronization of between tasks or between task and ISR

View File

@ -19,8 +19,8 @@ class Mutex : public MutexIF {
public: public:
Mutex(); Mutex();
~Mutex(); ~Mutex();
ReturnValue_t lockMutex(uint32_t timeoutMs); ReturnValue_t lockMutex(uint32_t timeoutMs) override;
ReturnValue_t unlockMutex(); ReturnValue_t unlockMutex() override;
private: private:
SemaphoreHandle_t handle; SemaphoreHandle_t handle;
}; };