1
0
forked from fsfw/fsfw

Added ISR calls for MQ and task mgmt

The task management defines an external function which
implements a context switch call from an ISR
This commit is contained in:
2020-05-18 17:22:10 +02:00
parent 6dc05e4951
commit 1d4d01d190
4 changed files with 199 additions and 58 deletions

View File

@ -0,0 +1,24 @@
#include <framework/osal/FreeRTOS/TaskManagement.h>
void TaskManagement::requestContextSwitchFromTask() {
vTaskDelay(0);
}
void TaskManagement::requestContextSwitch(CallContext callContext = CallContext::task) {
if(callContext == CallContext::isr) {
// This function depends on the partmacro.h definition for the specific device
requestContextSwitchFromISR();
} else {
requestContextSwitchFromTask();
}
}
TaskHandle_t TaskManagement::getCurrentTaskHandle() {
return xTaskGetCurrentTaskHandle();
}
configSTACK_DEPTH_TYPE TaskManagement::getTaskStackHighWatermark() {
return uxTaskGetStackHighWaterMark(TaskManagement::getCurrentTaskHandle());
}