freeRTOS version checks
This commit is contained in:
parent
95b2191824
commit
9170f466e8
@ -7,6 +7,9 @@
|
|||||||
#include <freertos/FreeRTOS.h>
|
#include <freertos/FreeRTOS.h>
|
||||||
#include <freertos/task.h>
|
#include <freertos/task.h>
|
||||||
|
|
||||||
|
#if (tskKERNEL_VERSION_MAJOR == 8 && tskKERNEL_VERSION_MINOR > 2) || \
|
||||||
|
tskKERNEL_VERSION_MAJOR > 8
|
||||||
|
|
||||||
// todo: does not work for older FreeRTOS version, so we should
|
// todo: does not work for older FreeRTOS version, so we should
|
||||||
// actually check whether tskKERNEL_VERSION_MAJOR is larger than.. 7 or 8 ?
|
// actually check whether tskKERNEL_VERSION_MAJOR is larger than.. 7 or 8 ?
|
||||||
|
|
||||||
@ -90,4 +93,6 @@ protected:
|
|||||||
TaskHandle_t handle;
|
TaskHandle_t handle;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* FSFW_OSAL_FREERTOS_BINSEMAPHUSINGTASK_H_ */
|
#endif /* FSFW_OSAL_FREERTOS_BINSEMAPHUSINGTASK_H_ */
|
||||||
|
@ -112,6 +112,8 @@ void PeriodicTask::checkMissedDeadline(const TickType_t xLastWakeTime,
|
|||||||
* it. */
|
* it. */
|
||||||
TickType_t currentTickCount = xTaskGetTickCount();
|
TickType_t currentTickCount = xTaskGetTickCount();
|
||||||
TickType_t timeToWake = xLastWakeTime + interval;
|
TickType_t timeToWake = xLastWakeTime + interval;
|
||||||
|
#if tskKERNEL_VERSION_MAJOR >= 10 && tskKERNEL_VERSION_MINOR > 4)
|
||||||
|
#else
|
||||||
// Time to wake has not overflown.
|
// Time to wake has not overflown.
|
||||||
if(timeToWake > xLastWakeTime) {
|
if(timeToWake > xLastWakeTime) {
|
||||||
/* If the current time has overflown exclusively or the current
|
/* If the current time has overflown exclusively or the current
|
||||||
@ -126,6 +128,7 @@ void PeriodicTask::checkMissedDeadline(const TickType_t xLastWakeTime,
|
|||||||
else if((timeToWake < xLastWakeTime) and (currentTickCount > timeToWake)) {
|
else if((timeToWake < xLastWakeTime) and (currentTickCount > timeToWake)) {
|
||||||
handleMissedDeadline();
|
handleMissedDeadline();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskHandle_t PeriodicTask::getTaskHandle() {
|
TaskHandle_t PeriodicTask::getTaskHandle() {
|
||||||
|
Loading…
Reference in New Issue
Block a user