void *pvParameters parametervTaskDelete(NULL) at the end of the taskvoid *pvParameters parametervTaskDelete(NULL) at the end of the taskvTaskFunction that takes a single parameter void *pvParameters and returns void. Inside the function, add an empty infinite loop for(;;).Remember, FreeRTOS task functions always have the signature void functionName(void *pvParameters) and usually run an infinite loop.
vTaskFunction, add a call to printf that prints the exact message "Task is running\n".Use printf inside the loop to show the task is running.
vTaskFunction, add a call to vTaskDelete(NULL) to delete the current task when it finishes.Use vTaskDelete(NULL) to delete the current task safely.
main function that calls printf with the exact message "Task function signature ready" to confirm your task function is defined correctly.Use printf in main to print the confirmation message.
What is the correct signature for a FreeRTOS task function?
void TaskName(void *pvParameters) exactly.Which of the following is a syntactically correct FreeRTOS task function declaration?
void MyTask(_____)
void *.void *pvParameters, which is correct syntax.What will happen if you run this FreeRTOS task function?
void ExampleTask(void *pvParameters) {
for(;;) {
// Task code here
}
}for(;;) infinite loop, so it runs repeatedly.Identify the error in this FreeRTOS task function:
void FaultyTask(void *pvParameters) {
int count = 0;
while(count < 5) {
count++;
}
return;
}You want to pass an integer value to a FreeRTOS task. Which is the correct way to define and use the task function?
void NumberTask(_____)
{
int received = *(int *)pvParameters;
for(;;) {
// Use received value
}
}void * parameter to allow any data type.void *, so parameter must be void *pvParameters.Pass the test and this pattern moves unknown