Britton Kerin <[email protected]> wrote:
> Is this likely to be a symptom of a bad binutils/gcc/avrlibc build?
> Genuine bug?
Genuine bug, yes. In your code. Just don't do it that way.
As Martin pointed out, the _delay_us/_delay_ms inline
functions do require a const argument (and always did).
What you can do is:
#include <stdint.h>
static void
delay_us(uint8_t us)
{
while (--us != 0)
_delay_us(1);
}
....
delay_us(42);
delay_us(43);
While this is quite customary to do in the millisecond range
(using _delay_ms(1)), it's questionable though whether your
call and computational overhead would not rather twice the
delays in the microsecond range.
--
cheers, Joerg .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)
_______________________________________________
AVR-chat mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-chat