Complete the code to send data to a queue with a blocking timeout.
xQueueSend(queueHandle, &data, [1]);Using portMAX_DELAY makes the task wait indefinitely until space is available in the queue.
Complete the code to receive data from a queue with a 100 tick timeout.
xQueueReceive(queueHandle, &receivedData, [1]);Passing 100 ticks makes the task wait up to 100 ticks for data.
Fix the error in the code to block on queue send with a timeout of 50 ticks.
xQueueSend(queueHandle, &data, [1]);The timeout parameter must be a tick count like 50 to block for that duration.
Fill both blanks to create a queue receive call that waits up to 200 ticks and stores data in variable 'msg'.
xQueueReceive([1], &[2], 200);
The first blank is the queue handle, and the second blank is the variable to store received data.
Fill all three blanks to send 'value' to 'queue1' with a 10 tick timeout and check if it was successful.
BaseType_t result = xQueueSend([1], &[2], [3]); if (result == pdPASS) { // success }
Use the queue name, the variable to send, and the timeout in ticks.
