News for hackers. Stuff that matters.
Re:DigiSpark (ATTiny85) – Arduino, C, Rust, build systems by rpaddock on Monday October 30, 2023 @11:56AM (#38071153)
To be pedantic _delay_ms() takes a double not an int.

In AVR_GCC versions before __builtin_avr_delay_cycles was available, in the compiler, if compiled with the Small Model (-Os) passing an int instead of a float ie: _dealy_ms(500.0f) would produce unexpected delays. This was a frequent source of bug reports in the early days of avr-libc. Those older versions relied on odd compile time coercions, and got confused if not passed a float.

I just wanted to mention that in case anyone has old versions of GCC laying around.

There are no comments on this comment yet.