66 #define FTSK_BYTES_TO_WORDS(VARIABALE_IN_BYTES) ((VARIABALE_IN_BYTES) / GEN_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)
115 static StaticQueue_t ftsk_databaseQueueStructure = {0};
122 ftsk_databaseQueueStorageArea,
123 &ftsk_databaseQueueStructure);
129 static StaticQueue_t ftsk_imdQueueStructure = {0};
139 static StaticQueue_t ftsk_canRxQueueStructure = {0};
145 ftsk_canRxQueueStorageArea,
146 &ftsk_canRxQueueStructure);
157 static StaticTask_t ftsk_taskEngine = {0};
160 const TaskHandle_t ftsk_taskHandleEngine = xTaskCreateStatic(
162 (
const portCHAR *)
"TaskEngine",
171 static StaticTask_t ftsk_taskCyclic1ms = {0};
174 const TaskHandle_t ftsk_taskHandleCyclic1ms = xTaskCreateStatic(
176 (
const portCHAR *)
"TaskCyclic1ms",
181 &ftsk_taskCyclic1ms);
185 static StaticTask_t ftsk_taskCyclic10ms = {0};
188 const TaskHandle_t ftsk_taskHandleCyclic10ms = xTaskCreateStatic(
190 (
const portCHAR *)
"TaskCyclic10ms",
194 ftsk_stackCyclic10ms,
195 &ftsk_taskCyclic10ms);
199 static StaticTask_t ftsk_taskCyclic100ms = {0};
202 const TaskHandle_t ftsk_taskHandleCyclic100ms = xTaskCreateStatic(
204 (
const portCHAR *)
"TaskCyclic100ms",
208 ftsk_stackCyclic100ms,
209 &ftsk_taskCyclic100ms);
213 static StaticTask_t ftsk_taskCyclicAlgorithm100ms = {0};
216 const TaskHandle_t ftsk_taskHandleCyclicAlgorithm100ms = xTaskCreateStatic(
218 (
const portCHAR *)
"TaskCyclicAlgorithm100ms",
222 ftsk_stackCyclicAlgorithm100ms,
223 &ftsk_taskCyclicAlgorithm100ms);
227 static StaticTask_t ftsk_taskAfe = {0};
232 (
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 handle for the AFE task.
#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.