arduino icon indicating copy to clipboard operation
arduino copied to clipboard

micros() code bug

Open maxgerhardt opened this issue 4 years ago • 0 comments

You write

https://github.com/w600/arduino/blob/6148ebcdfee95c295a7d5d27489dc36872c39e1a/cores/w600/wiring_time.c#L39-L50

and you write

https://github.com/w600/arduino/blob/6148ebcdfee95c295a7d5d27489dc36872c39e1a/cores/w600/wiring_time.c#L16-L19

By which you can see that in line 45, you are not calling the function and checking its return value, you are doing if(function name), and since function name is also the address of the function, the if statement will always have a true statement.

maxgerhardt avatar Sep 24 '20 22:09 maxgerhardt