Complete the code to create a FreeRTOS task that prints "Hello".
xTaskCreate([1], "Task1", 1000, NULL, 1, NULL);
The function passed to xTaskCreate must be the task function that runs the task code.
Complete the code to delay a task for 100 ticks.
vTaskDelay([1]);vTaskDelay delays the task for the number of ticks specified. Here, 100 ticks is the intended delay.
Fix the error in the task creation code to ensure the task runs properly.
xTaskCreate(vTaskFunction, "Task2", [1], NULL, 1, NULL);
The stack size must be a positive number. Zero or NULL will cause the task not to run properly.
Fill both blanks to create a reliable queue and send data to it.
QueueHandle_t queue = xQueueCreate([1], sizeof(int)); xQueueSend(queue, &[2], portMAX_DELAY);
The queue size is 10, and the variable data is sent to the queue.
Fill all three blanks to receive data from a queue and process it safely.
int [1]; if(xQueueReceive(queue, &[2], [3]) == pdPASS) { process([1]); }
The variable receivedData stores the received value. The function waits indefinitely with portMAX_DELAY until data arrives.