Fix: xSemaphoreTake was useless
There was no check of the return value implemented therefore xSemaphoreTake was just executed and not locked
This commit is contained in:
parent
0441bbbe72
commit
3504884836
@ -12,7 +12,9 @@
|
|||||||
#include "inverters/HM_4CH.h"
|
#include "inverters/HM_4CH.h"
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
#define HOY_SEMAPHORE_TAKE() xSemaphoreTake(_xSemaphore, portMAX_DELAY)
|
#define HOY_SEMAPHORE_TAKE() \
|
||||||
|
do { \
|
||||||
|
} while (xSemaphoreTake(_xSemaphore, portMAX_DELAY) != pdPASS)
|
||||||
#define HOY_SEMAPHORE_GIVE() xSemaphoreGive(_xSemaphore)
|
#define HOY_SEMAPHORE_GIVE() xSemaphoreGive(_xSemaphore)
|
||||||
|
|
||||||
HoymilesClass Hoymiles;
|
HoymilesClass Hoymiles;
|
||||||
|
|||||||
@ -8,7 +8,9 @@
|
|||||||
|
|
||||||
MessageOutputClass MessageOutput;
|
MessageOutputClass MessageOutput;
|
||||||
|
|
||||||
#define MSG_LOCK() xSemaphoreTake(_lock, portMAX_DELAY)
|
#define MSG_LOCK() \
|
||||||
|
do { \
|
||||||
|
} while (xSemaphoreTake(_lock, portMAX_DELAY) != pdPASS)
|
||||||
#define MSG_UNLOCK() xSemaphoreGive(_lock)
|
#define MSG_UNLOCK() xSemaphoreGive(_lock)
|
||||||
|
|
||||||
MessageOutputClass::MessageOutputClass()
|
MessageOutputClass::MessageOutputClass()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user