Page 1 of 1

C-code->how to add micros() function?

Posted: Sat Nov 26, 2022 7:09 am
by viktor_au
Hello
I am trying to add a C-code from an Arduino IDE program.
It is a micros() function.
I have problem, as this function calls a cli() --( macro) that executes an assembler macro to disable interrupt.

Any help will be great.

Re: C-code->how to add micros() function?

Posted: Mon Nov 28, 2022 6:04 pm
by Benj
Hello,

Looks like you can simply use the Timer component available under data->storage to do a similar thing and get the time in microseconds. Then no C code nessisary :D

Re: C-code->how to add micros() function?

Posted: Mon Nov 28, 2022 10:56 pm
by viktor_au
Well... It is one way to do it.
Another way is to use C-code..

Thanks Ben