FreeRTOS - Task Scheduling
Identify the error in this FreeRTOS idle hook implementation:
void vApplicationIdleHook(void) {
int count = 0;
count++;
if (count == 5) {
// Do something
}
}Identify the error in this FreeRTOS idle hook implementation:
void vApplicationIdleHook(void) {
int count = 0;
count++;
if (count == 5) {
// Do something
}
}count is declared inside the function, so it resets to 0 every call.count as static keeps its value between calls, allowing counting.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions