avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Re: [bug #17216] change to the ../util/delay.h header


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] Re: [bug #17216] change to the ../util/delay.h header for increased functionality
Date: Sun, 6 Mar 2011 22:02:12 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

As Weddington, Eric wrote:

> I question the whole viability of a _delay_ns() function. If someone
> wants a resolution that small, then they should be able to do the
> calculation and use the __builtin_avr_delay_cycles() builtin
> function instead.

But that way, you might as well question the other _delay_*s
functions. ;-)  They have been created to take off the actual
cycle count calculation from the user, to the computer, that's
their only purpose.

Yes, it's only a few cycles, but the same is true for e.g.
_delay_us(12) on a standard AVR running at its default clock of 1 MHz.
I don't see a difference here to writing _delay_ns(300) on a modern
mega or xmega device running at 20 MHz, and be it only the
auto-documentation effect.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]