[En-Nut-Discussion] AVR: Use of _delay_loop_2 versus nut_delay_loops
Harald Kipp
harald.kipp at egnite.de
Thu Sep 27 12:21:55 CEST 2012
Hi Uwe,
On 24.09.2012 14:17, Uwe Bonnes wrote:
> in SVN Head for NutMicroDelay for AVR, I replaces the usage of
> nut_delay_loops with all it's magic constants with a call to the avr-libc
> supplied _delay_loop_2() Funktion. Beside setup, the functions eats 4 cycle
> for each pass. This change made the BitBanging One-Wire example work with
> AVR too.
>
> Please let me know if I broke anything.
It doesn't work for AVR devices, which automatically detect their CPU frequency and do not have NUT_CPU_FREQ defined.
Furthermore, there seem to be other problems with AVR as well, possibly introduced by
#if !defined(NUT_DELAYLOOPS) && !defined(__AVR) && !defined(__CORTEX__)
where two underscores are missing.
Regards,
Harald
More information about the En-Nut-Discussion
mailing list