[Top][All Lists]

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

Re: [avr-libc-dev] does delay.h really need all this junk?

From: Joerg Wunsch
Subject: Re: [avr-libc-dev] does delay.h really need all this junk?
Date: Tue, 9 Dec 2008 20:26:00 +0100
User-agent: Mutt/1.5.11

As Steve Franks wrote:

> Is this really just for the convinienece of using F_CPU?  I grabbed
> delay_loop_2(), put it in a for() loop, and my code went from 4k to
> 1k...

After all, the convenience of using F_CPU and times in microseconds
and milliseconds is *the* difference between _delay_us and _delay_ms,
vs. just using _delay_loop_1 and _delay_loop_2 directly.  The latter
have been there well before, and the functionality to specify the
delay in a more natural (to humans) way once used to be a frequently
requested item.

Btw., _delay_ms now falls back to a wrapped outer/inner loop approach
iff the delay gets too large, since there have obviously been too many
people trying to call _delay_ms(500) or such.

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]