71 #define FTSK_BYTES_TO_WORDS(VARIABLE_IN_BYTES) ((VARIABLE_IN_BYTES) / GEN_BYTES_PER_WORD)
73 #define FTSK_TASK_ENGINE_STACK_SIZE_IN_WORDS FTSK_BYTES_TO_WORDS(FTSK_TASK_ENGINE_STACK_SIZE_IN_BYTES)
75 #define FTSK_TASK_CYCLIC_1MS_STACK_SIZE_IN_WORDS FTSK_BYTES_TO_WORDS(FTSK_TASK_CYCLIC_1MS_STACK_SIZE_IN_BYTES)
77 #define FTSK_TASK_CYCLIC_10MS_STACK_SIZE_IN_WORDS FTSK_BYTES_TO_WORDS(FTSK_TASK_CYCLIC_10MS_STACK_SIZE_IN_BYTES)
79 #define FTSK_TASK_CYCLIC_100MS_STACK_SIZE_IN_WORDS FTSK_BYTES_TO_WORDS(FTSK_TASK_CYCLIC_100MS_STACK_SIZE_IN_BYTES)
81 #define FTSK_TASK_CYCLIC_ALGORITHM_100MS_STACK_SIZE_IN_WORDS \
82 FTSK_BYTES_TO_WORDS(FTSK_TASK_CYCLIC_ALGORITHM_100MS_STACK_SIZE_IN_BYTES)
84 #define FTSK_TASK_AFE_STACK_SIZE_IN_WORDS FTSK_BYTES_TO_WORDS(FTSK_TASK_AFE_STACK_SIZE_IN_BYTES)
87 #define FTSK_DATABASE_QUEUE_STORAGE_AREA (FTSK_DATABASE_QUEUE_LENGTH * FTSK_DATABASE_QUEUE_ITEM_SIZE_IN_BYTES)
90 #define FTSK_IMD_QUEUE_STORAGE_AREA (FTSK_IMD_QUEUE_LENGTH * FTSK_IMD_QUEUE_ITEM_SIZE_IN_BYTES)
93 #define FTSK_CAN_RX_QUEUE_STORAGE_AREA (FTSK_CAN_RX_QUEUE_LENGTH * FTSK_CAN_RX_QUEUE_ITEM_SIZE_IN_BYTES)
96 #define FTSK_RTC_QUEUE_STORAGE_AREA (FTSK_RTC_QUEUE_LENGTH * FTSK_RTC_QUEUE_ITEM_SIZE_IN_BYTES)
99 #define FTSK_AFEI2C_QUEUE_STORAGE_AREA (FTSK_AFEI2C_QUEUE_LENGTH * FTSK_AFEI2C_QUEUE_ITEM_SIZE_IN_BYTES)
138 static StaticQueue_t ftsk_databaseQueueStructure = {0};
145 ftsk_databaseQueueStorageArea,
146 &ftsk_databaseQueueStructure);
181 static StaticQueue_t ftsk_afeRequestQueueStructure = {0};
188 ftsk_afeRequestQueueStorageArea,
189 &ftsk_afeRequestQueueStructure);
204 static StaticQueue_t ftsk_afeToI2cQueueStructure = {0};
209 ftsk_afeToI2cQueueStorageArea,
210 &ftsk_afeToI2cQueueStructure);
216 static StaticQueue_t ftsk_afeFromI2cQueueStructure = {0};
221 ftsk_afeFromI2cQueueStorageArea,
222 &ftsk_afeFromI2cQueueStructure);
239 static StaticTask_t ftsk_taskEngine = {0};
242 const TaskHandle_t ftsk_taskHandleEngine = xTaskCreateStatic(
244 (
const portCHAR *)
"TaskEngine",
253 static StaticTask_t ftsk_taskCyclic1ms = {0};
256 const TaskHandle_t ftsk_taskHandleCyclic1ms = xTaskCreateStatic(
258 (
const portCHAR *)
"TaskCyclic1ms",
263 &ftsk_taskCyclic1ms);
267 static StaticTask_t ftsk_taskCyclic10ms = {0};
270 const TaskHandle_t ftsk_taskHandleCyclic10ms = xTaskCreateStatic(
272 (
const portCHAR *)
"TaskCyclic10ms",
276 ftsk_stackCyclic10ms,
277 &ftsk_taskCyclic10ms);
281 static StaticTask_t ftsk_taskCyclic100ms = {0};
284 const TaskHandle_t ftsk_taskHandleCyclic100ms = xTaskCreateStatic(
286 (
const portCHAR *)
"TaskCyclic100ms",
290 ftsk_stackCyclic100ms,
291 &ftsk_taskCyclic100ms);
295 static StaticTask_t ftsk_taskCyclicAlgorithm100ms = {0};
298 const TaskHandle_t ftsk_taskHandleCyclicAlgorithm100ms = xTaskCreateStatic(
300 (
const portCHAR *)
"TaskCyclicAlgorithm100ms",
304 ftsk_stackCyclicAlgorithm100ms,
305 &ftsk_taskCyclicAlgorithm100ms);
309 static StaticTask_t ftsk_taskI2c = {0};
314 (
const portCHAR *)
"TaskI2c",
327 static StaticTask_t ftsk_taskAfe = {0};
332 (
const portCHAR *)
"TaskAfe",
342 #ifdef UNITY_UNIT_TEST
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.
void FTSK_CreateTaskI2c(void *const pvParameters)
Creation of continuously running task for I2c.
Header of task driver implementation.
#define FTSK_DATABASE_QUEUE_LENGTH
#define FTSK_DATABASE_QUEUE_ITEM_SIZE_IN_BYTES
#define FTSK_AFE_REQUEST_QUEUE_ITEM_SIZE
#define FTSK_CAN_RX_QUEUE_ITEM_SIZE_IN_BYTES
#define FTSK_AFEI2C_QUEUE_LENGTH
#define FTSK_CAN_RX_QUEUE_LENGTH
#define FTSK_AFEI2C_QUEUE_ITEM_SIZE_IN_BYTES
#define FTSK_IMD_QUEUE_ITEM_SIZE_IN_BYTES
#define FTSK_RTC_QUEUE_ITEM_SIZE_IN_BYTES
#define FTSK_RTC_QUEUE_LENGTH
#define FTSK_AFE_REQUEST_QUEUE_LENGTH
#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_taskDefinitionI2c
Task configuration of the continuously running task for MCU I2C communication.
OS_TASK_DEFINITION_s ftsk_taskDefinitionCyclic10ms
Task configuration of the cyclic 10 ms task.
OS_QUEUE ftsk_afeFromI2cQueue
#define FTSK_TASK_CYCLIC_1MS_STACK_SIZE_IN_WORDS
Stack size of cyclic 1 ms task in words.
OS_QUEUE ftsk_rtcSetTimeQueue
#define FTSK_IMD_QUEUE_STORAGE_AREA
#define FTSK_CAN_RX_QUEUE_STORAGE_AREA
#define FTSK_BYTES_TO_WORDS(VARIABLE_IN_BYTES)
OS_QUEUE ftsk_imdCanDataQueue
#define FTSK_RTC_QUEUE_STORAGE_AREA
volatile bool ftsk_allQueuesCreated
#define FTSK_AFEI2C_QUEUE_STORAGE_AREA
#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.
OS_TASK_HANDLE ftsk_taskHandleAfe
Definition of task handle for the AFE task.
#define FTSK_TASK_CYCLIC_10MS_STACK_SIZE_IN_WORDS
Stack size of cyclic 10 ms task in words.
OS_QUEUE ftsk_afeToI2cQueue
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.
OS_QUEUE ftsk_afeRequestQueue
OS_QUEUE ftsk_databaseQueue
void FTSK_CreateQueues(void)
Creates all queues.
OS_TASK_HANDLE ftsk_taskHandleI2c
Definition of task handles.
General macros and definitions for the whole platform.
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 StaticQueue_t ftsk_rtcQueueStructure
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]