微秒阻塞延时

Kwingesp32
Posts: 6
Joined: Fri Nov 30, 2018 3:11 pm

微秒阻塞延时

Postby Kwingesp32 » Fri Nov 30, 2018 3:24 pm

esp32使用espidf和eclipse c/c++,编译工具是cygwin,请问如何实现微秒级阻塞延时,vTaskDelay只能实现毫秒级,没办法去检测和读取DHT11,网上有用arduino做的,不知道是用原生的espidf怎么实现。esp8266使用的是os_delay_us,不知道esp32使用什么来实现微秒级阻塞延时,希望有大佬能帮一下,谢谢!

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: 微秒阻塞延时

Postby ESP_igrr » Sat Dec 01, 2018 12:20 pm

"usleep" function from unistd.h should do the trick.

Kwingesp32
Posts: 6
Joined: Fri Nov 30, 2018 3:11 pm

Re: 微秒阻塞延时

Postby Kwingesp32 » Mon Dec 03, 2018 9:09 am

谢谢,我试一下

Who is online

Users browsing this forum: No registered users and 29 guests