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: Stu Bell
Subject: Re: [avr-libc-dev] [bug #32650] Missing include in util/delay.h
Date: Fri, 04 Mar 2011 06:42:47 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.14) Gecko/20110221 Lightning/1.0b2 Thunderbird/3.1.8

On 3/3/2011 10:04 PM, Weddington, Eric wrote:

-----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.
I suppose. Has this changed in the latest version of the _delay_* routines? I don't recall needing this before.

Stu Bell



reply via email to

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