1
0
forked from fsfw/fsfw

Merge branch 'mueller_binSemaph' into mueller_FreeRTOS_improvements

This commit is contained in:
2020-05-18 17:46:04 +02:00
4 changed files with 301 additions and 13 deletions

View File

@ -8,7 +8,7 @@ extern "C" {
#include <freertos/task.h>
}
#include <cstdint>
/**
* Architecture dependant portmacro.h function call.
* Should be implemented in bsp.
@ -18,7 +18,8 @@ extern "C" void requestContextSwitchFromISR();
/*!
* Used by functions to tell if they are being called from
* within an ISR or from a regular task. This is required because FreeRTOS
* has different functions for handling semaphores and messages from within an ISR and task.
* has different functions for handling semaphores and messages from within
* an ISR and task.
*/
enum CallContext {
@ -30,10 +31,10 @@ enum CallContext {
class TaskManagement {
public:
/**
* In this function, a function dependant on the portmacro.h header function calls
* to request a context switch can be specified.
* This can be used if sending to the queue from an ISR caused a task to unblock
* and a context switch is required.
* @brief In this function, a function dependant on the portmacro.h header
* function calls to request a context switch can be specified.
* This can be used if sending to the queue from an ISR caused a task
* to unblock and a context switch is required.
*/
static void requestContextSwitch(CallContext callContext);
@ -41,7 +42,7 @@ public:
* If task preemption in FreeRTOS is disabled, a context switch
* can be requested manually by calling this function.
*/
static void requestContextSwitchFromTask(void);
static void requestContextSwitchFromTask(void);
/**
* @return The current task handle
@ -57,7 +58,7 @@ public:
* @return Smallest value of stack remaining since the task was started in
* words.
*/
static configSTACK_DEPTH_TYPE getTaskStackHighWatermark();
static configSTACK_DEPTH_TYPE getTaskStackHighWatermark();
};
#endif /* FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_ */