> -----Original Message-----
> From: 
> [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]
> org] On Behalf Of Steve Franks
> Sent: Monday, December 08, 2008 5:06 PM
> To: [email protected]
> 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. 


_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to