Complete the code to create a FreeRTOS timer named "MyTimer" with a period of 1000 ticks.
TimerHandle_t timer = xTimerCreate("MyTimer", [1], pdFALSE, NULL, NULL);
The second parameter of xTimerCreate() is the timer period in ticks. Here, 1000 ticks sets the timer period.
Complete the code to create an auto-reload timer (periodic timer).
TimerHandle_t timer = xTimerCreate("AutoReloadTimer", 500, [1], NULL, NULL);
The third parameter sets whether the timer auto-reloads. pdTRUE means the timer restarts automatically.
Fix the error in the timer creation code by filling the missing callback function.
TimerHandle_t timer = xTimerCreate("Timer", 200, pdFALSE, NULL, [1]);
The last parameter is the callback function called when the timer expires. It must be a valid function pointer.
Fill both blanks to create a periodic timer named "BlinkTimer" with a 250 tick period and a callback function BlinkTimerCallback.
TimerHandle_t timer = xTimerCreate([1], [2], pdTRUE, NULL, BlinkTimerCallback);
The first parameter is the timer name as a string. The second is the timer period in ticks.
Fill all three blanks to create a one-shot timer named "Timeout" with a 500 tick period and callback TimeoutCallback.
TimerHandle_t timer = xTimerCreate([1], [2], [3], NULL, TimeoutCallback);
The first parameter is the timer name, second is the period, and third specifies one-shot mode with pdFALSE.
