[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] _delay_us pulling in floating point lib?
From: |
Bob Paddock |
Subject: |
[avr-gcc-list] _delay_us pulling in floating point lib? |
Date: |
Wed, 16 Aug 2006 10:27:54 -0400 |
User-agent: |
Opera M2/8.54 (Win32, build 7730) |
I was working toward some precision delays that I needed.
I was starting with this function:
#include <inttypes.h>
#include "util/delay.h"
inline void delay_us( uint8_t delay_u8 )
{
uint8_t irq_state_u8 = SREG;
__disable_interrupt(); /* Macro to cli */
_delay_us( (double) delay_u8 ); /* Also tried without the cast, same
results */
SREG = irq_state_u8;
}
main()
{
/* stuff */
delay_us( 15 );
/* more stuff */
}
I realize in the end I'll need to compensate for the SREGs save/restore
time etc,
but I wanted to start with something simple and generic before I started
refining it.
The problem is that the list files shows that floating point library
is being used, when comments in delay.h say that should not happen.
Also the function was not inlined when I called it.
I have -Os for optimization. This is with WinAVR345.
Where did I go wrong?
- [avr-gcc-list] _delay_us pulling in floating point lib?,
Bob Paddock <=