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

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

RE: [avr-libc-dev] [bug #32650] Missing include in util/delay.h


From: Weddington, Eric
Subject: RE: [avr-libc-dev] [bug #32650] Missing include in util/delay.h
Date: Thu, 3 Mar 2011 22:04:40 -0700


> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Stu Bell
> Sent: Thursday, March 03, 2011 9:49 PM
> To: Alastair D'Silva; Stu Bell; address@hidden
> Subject: [avr-libc-dev] [bug #32650] Missing include in util/delay.h
> 
> Follow-up Comment #1, bug #32650 (project avr-libc):
> 
> The math library is not needed if you do not pass a variable to _delay_ms
> (or
> _delay_us) as the instructions to avr-libc warn you not to do.  Only
> constants
> can be supplied to the delay functions.
> 
> In fact, following your path will bring in the floating-point library
> unnecessarily and will cause the delay functions to generate far more
> delay
> that requested.

Remember, just including a header file (like math.h) does not mean that the 
library is automatically linked in.

The library is only linked in if the linker detects that it is needed. And even 
then it doesn't pull in the entire library, just the module that is needed.



reply via email to

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