vTaskDelay() vS. Delay()

basinus
Posts: 2
Joined: Tue Jul 04, 2017 5:59 pm

vTaskDelay() vS. Delay()

Postby basinus » Sat Jul 08, 2017 5:30 pm

What is the difference between both? Why should i use

Code: Select all

portTICK_PERIOD_MS = 10;
vTaskDelay(1000 / portTICK_PERIOD_MS);
// 1000/10 = 100 Ticks 
instead of Delay(1000)? And what is exactly one tick?

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: vTaskDelay() vS. Delay()

Postby ESP_Sprite » Sun Jul 09, 2017 2:45 am

Where do you get the Delay() function from? It's not part of ESP-IDF.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: vTaskDelay() vS. Delay()

Postby WiFive » Sun Jul 09, 2017 3:04 am

Delay is an arduino function wrapper that calls vtaskdelay. You should use it if you are using arduino, and also you should post in the arduino forum.

https://esp32.com/viewtopic.php?f=2&t=2377

A tick is what you configure it to be. THE TICK is a new Netflix show.

Who is online

Users browsing this forum: MaxTTL and 38 guests