on-internet
← Community

What is the least delay "yield" like call?

Stack Overflow ·

The getting started examples in Espressif's esp-idf are hello-world and blink. Hello-world outputs prints then calls esp_restart(); - so it is in it's own special infinite loop. The blink example (with comments removed) has this app_main, which is also an infinite loop: void app_main(void) { gpio_pad_select_gpio(BLINK_GPIO); gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT); while(1) { printf("Turning off the LED\n"); gpio_set_level(BLINK_GPIO, 0); vTaskDelay(1000 / portTICK_PERIOD_MS); printf("Turning on the LED\n"); gpio_set_level(BLINK_GPIO, 1); vTaskDelay(1000 / portTICK_PERIOD_MS); } } I c

Comments

Sign in or sign up to comment and upvote.

No comments yet.