66 #define FTSK_BYTES_TO_WORDS(VARIABALE_IN_BYTES) ((VARIABALE_IN_BYTES) / BYTES_PER_WORD)
68 #define FTSK_TASK_ENGINE_STACK_SIZE_IN_WORDS FTSK_BYTES_TO_WORDS(FTSK_TASK_ENGINE_STACK_SIZE_IN_BYTES)
70 #define FTSK_TASK_CYCLIC_1MS_STACK_SIZE_IN_WORDS FTSK_BYTES_TO_WORDS(FTSK_TASK_CYCLIC_1MS_STACK_SIZE_IN_BYTES)
72 #define FTSK_TASK_CYCLIC_10MS_STACK_SIZE_IN_WORDS FTSK_BYTES_TO_WORDS(FTSK_TASK_CYCLIC_10MS_STACK_SIZE_IN_BYTES)
74 #define FTSK_TASK_CYCLIC_100MS_STACK_SIZE_IN_WORDS FTSK_BYTES_TO_WORDS(FTSK_TASK_CYCLIC_100MS_STACK_SIZE_IN_BYTES)
76 #define FTSK_TASK_CYCLIC_ALGORITHM_100MS_STACK_SIZE_IN_WORDS \
77 FTSK_BYTES_TO_WORDS(FTSK_TASK_CYCLIC_ALGORITHM_100MS_STACK_SIZE_IN_BYTES)
79 #define FTSK_TASK_AFE_STACK_SIZE_IN_WORDS FTSK_BYTES_TO_WORDS(FTSK_TASK_AFE_STACK_SIZE_IN_BYTES)
82 #define FTSK_DATABASE_QUEUE_STORAGE_AREA (FTSK_DATABASE_QUEUE_LENGTH * FTSK_DATABASE_QUEUE_ITEM_SIZE_IN_BYTES)
85 #define FTSK_IMD_QUEUE_STORAGE_AREA (FTSK_IMD_QUEUE_LENGTH * FTSK_IMD_QUEUE_ITEM_SIZE_IN_BYTES)
88 #define FTSK_CAN_RX_QUEUE_STORAGE_AREA (FTSK_CAN_RX_QUEUE_LENGTH * FTSK_CAN_RX_QUEUE_ITEM_SIZE_IN_BYTES)
114 static StaticQueue_t ftsk_databaseQueueStructure = {0};
121 ftsk_databaseQueueStorageArea,
122 &ftsk_databaseQueueStructure);
156 static StaticTask_t ftsk_taskEngine = {0};
159 const TaskHandle_t ftsk_taskHandleEngine = xTaskCreateStatic(
161 (
const portCHAR *)
"TaskEngine",
170 static StaticTask_t ftsk_taskCyclic1ms = {0};
173 const TaskHandle_t ftsk_taskHandleCyclic1ms = xTaskCreateStatic(
175 (
const portCHAR *)
"TaskCyclic1ms",
180 &ftsk_taskCyclic1ms);
184 static StaticTask_t ftsk_taskCyclic10ms = {0};
187 const TaskHandle_t ftsk_taskHandleCyclic10ms = xTaskCreateStatic(
189 (
const portCHAR *)
"TaskCyclic10ms",
193 ftsk_stackCyclic10ms,
194 &ftsk_taskCyclic10ms);
198 static StaticTask_t ftsk_taskCyclic100ms = {0};
201 const TaskHandle_t ftsk_taskHandleCyclic100ms = xTaskCreateStatic(
203 (
const portCHAR *)
"TaskCyclic100ms",
207 ftsk_stackCyclic100ms,
208 &ftsk_taskCyclic100ms);
212 static StaticTask_t ftsk_taskCyclicAlgorithm100ms = {0};
215 const TaskHandle_t ftsk_taskHandleCyclicAlgorithm100ms = xTaskCreateStatic(
217 (
const portCHAR *)
"TaskCyclicAlgorithm100ms",
221 ftsk_stackCyclicAlgorithm100ms,
222 &ftsk_taskCyclicAlgorithm100ms);
226 static StaticTask_t ftsk_taskAfe = {0};
231 (
const portCHAR *)
"TaskAfe",
Headers for the configuration for the CAN module.
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define NULL
NULL definition.
#define NULL_PTR
Null pointer.
void FTSK_CreateTaskEngine(void *const pvParameters)
Database-Task.
void FTSK_CreateTaskCyclicAlgorithm100ms(void *const pvParameters)
Creation of cyclic 100 ms algorithm task.
void FTSK_CreateTaskCyclic100ms(void *const pvParameters)
Creation of cyclic 100 ms task.
void FTSK_CreateTaskCyclic10ms(void *const pvParameters)
Creation of cyclic 10 ms task.
void FTSK_CreateTaskAfe(void *const pvParameters)
Creation of continuously running task for AFEs.
void FTSK_CreateTaskCyclic1ms(void *const pvParameters)
Creation of cyclic 1 ms task.
Header of task driver implementation.
#define FTSK_DATABASE_QUEUE_LENGTH
#define FTSK_DATABASE_QUEUE_ITEM_SIZE_IN_BYTES
#define FTSK_CAN_RX_QUEUE_ITEM_SIZE_IN_BYTES
#define FTSK_CAN_RX_QUEUE_LENGTH
#define FTSK_IMD_QUEUE_ITEM_SIZE_IN_BYTES
#define FTSK_IMD_QUEUE_LENGTH
OS_TASK_DEFINITION_s ftsk_taskDefinitionAfe
Task configuration of the continuously running task for AFEs.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclic100ms
Task configuration of the cyclic 100 ms task.
OS_TASK_DEFINITION_s ftsk_taskDefinitionEngine
Definition of the engine task.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclic1ms
Task configuration of the cyclic 1 ms task.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclicAlgorithm100ms
Task configuration of the cyclic 100 ms task for algorithms.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclic10ms
Task configuration of the cyclic 10 ms task.
#define FTSK_TASK_CYCLIC_1MS_STACK_SIZE_IN_WORDS
Stack size of cyclic 1 ms task in words.
#define FTSK_IMD_QUEUE_STORAGE_AREA
#define FTSK_CAN_RX_QUEUE_STORAGE_AREA
volatile bool ftsk_allQueuesCreated
QueueHandle_t ftsk_databaseQueue
#define FTSK_TASK_ENGINE_STACK_SIZE_IN_WORDS
#define FTSK_TASK_AFE_STACK_SIZE_IN_WORDS
Stack size of continuously running task for AFEs.
#define FTSK_TASK_CYCLIC_ALGORITHM_100MS_STACK_SIZE_IN_WORDS
Stack size of cyclic 100 ms task for algorithms in words.
TaskHandle_t ftsk_taskHandleAfe
Definition of task handles.
#define FTSK_BYTES_TO_WORDS(VARIABALE_IN_BYTES)
#define FTSK_TASK_CYCLIC_10MS_STACK_SIZE_IN_WORDS
Stack size of cyclic 10 ms task in words.
void FTSK_CreateTasks(void)
Creates all tasks of the group.
#define FTSK_DATABASE_QUEUE_STORAGE_AREA
#define FTSK_TASK_CYCLIC_100MS_STACK_SIZE_IN_WORDS
Stack size of cyclic 100 ms task in words.
QueueHandle_t ftsk_canRxQueue
void FTSK_CreateQueues(void)
Creates all queues.
QueueHandle_t ftsk_imdCanDataQueue
void OS_ExitTaskCritical(void)
Exit Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
void OS_EnterTaskCritical(void)
Enter Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
static uint8_t ftsk_imdQueueStorageArea[FTSK_IMD_QUEUE_LENGTH *FTSK_IMD_QUEUE_ITEM_SIZE]
static StaticQueue_t ftsk_canRxQueueStructure
static StaticQueue_t ftsk_imdQueueStructure
static uint8_t ftsk_canRxQueueStorageArea[FTSK_CAN_RX_QUEUE_LENGTH *FTSK_CAN_RX_QUEUE_ITEM_SIZE]