vTaskSetTimeOutState(...) and xTaskCheckForTimeOut(...) from interrupt

richarddamon wrote on Wednesday, July 10, 2019:

That is the whole purpose of freertos_tasks_c_additions.h, it is code that you provide that is automatically included into tasks.c when you define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H as 1 in FreeRTOSConfig.h

Even though it has a .h extension, think of it as a .c file for your program. (I personally might have called it something like freertos_tasks_c_additions.c to be clearer that it shouldn’t be included elsewhere (but then you do need to make sure it isn’t compiled as an indendant file also)

Code in freertos_tasks_c_additions.h, since it is include by tasks.c, has full access to all the variables and defintions inside tasks.c. You add your code there, and it effectively gets added to tasks.c without needing to actually change the file. Because the code in there wants to see the private internals of tasks.c, it can’t be included elsewhere in your system. You will need to have a header file to provide the needed declerations of the functions in that file so other files can call them.