Page 1 of 1

How to delay microsecond

Posted: Sat Mar 11, 2017 1:36 am
by cuongle
Hi all, I'm a new member.
I want to read analog signal via adc with sample rate about 48khz so when I read via adc and delay about 20us. But I can't find the way how to delay microsecond in esp-idf. Please help me!
Thanks all so much.

Re: How to delay microsecond

Posted: Sat Mar 11, 2017 5:39 am
by kolban
It might be that the function called "ets_delay_us(value)" is what you could use. Its proto type is defined in <rom/ets_sys.h>.

Re: How to delay microsecond

Posted: Mon Mar 13, 2017 9:02 am
by cuongle
kolban wrote:It might be that the function called "ets_delay_us(value)" is what you could use. Its proto type is defined in <rom/ets_sys.h>.
I have done it by your support. Thank you so much.