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

[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: Weddington, Eric
Subject: RE: [avr-libc-dev] does delay.h really need all this junk?
Date: Mon, 8 Dec 2008 22:34:43 -0700

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Steve Franks
> Sent: Monday, December 08, 2008 5:06 PM
> To: address@hidden
> Subject: [avr-libc-dev] does delay.h really need all this junk?
> 
> Y'all,
> 
> I was trying to figure out why _delay_us() was eating up all my flash
> in a tiny2313, so I threw in a <link> -nodefaultlibs, and look what I
> found! 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...

Read the documentation on _delay_us(). You need to use a constant value for the 
parameter, and you need to turn optimizations on. 




reply via email to

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