Complete the code to create a FreeRTOS task that prints "Hello World".
xTaskCreate([1], "Task1", 1000, NULL, 1, NULL);
The function passed to xTaskCreate must be the task function, here named vTaskFunction.
Complete the code to start the FreeRTOS scheduler.
int main(void) {
// Setup code
[1]();
for(;;); // Loop forever
}The scheduler is started by calling vTaskStartScheduler().
Fix the error in the task function to correctly delay the task for 1000 milliseconds.
void vTaskFunction(void *pvParameters) {
for(;;) {
// Do work
[1];
}
}portTICK_PERIOD_MS incorrectly.FreeRTOS delays use ticks, so pdMS_TO_TICKS(1000) converts 1000 milliseconds to ticks correctly.
Fill both blanks to create a dictionary comprehension that maps task names to their priorities for tasks with priority greater than 1.
task_priorities = {task.name: task[1] for task in tasks if task.priority [2] 1}Access the task priority with .priority and filter tasks with priority greater than 1 using >.
Fill all three blanks to create a dictionary comprehension that maps uppercase task names to their stack sizes for tasks with stack size greater than 512.
task_info = { [1]: [2] for task in tasks if task.stack_size [3] 512}Use task.name.upper() for uppercase names, task.stack_size for stack size, and filter with > 512.