/[avr-libc]
ViewVC logotype

Revision 2103


Jump to revision: Previous Next
Author: joerg_wunsch
Date: Wed Mar 17 05:16:10 2010 UTC (13 years, 8 months ago)
Changed paths: 6
Log Message:
Probe the compiler for the availability of the
__builtin_avr_delay_cycles() function, and modify the header files
<util/delay.h> and <avr/builtins.h> appropriately.  Note that the
modification is done by setting __HAS_DELAY_CYCLES on top of those
files, which has been left overridable from the compiler environment
(i.e., commandline -D option) on purpose.  Note also that _delay_us()
and _delay_ms() can only use __builtin_avr_delay_cycles() if
optimization is enabled as they'd otherwise try to pass a
floating-point argument to it which is not allowed.  (The compiler
does not seem to be able to convert it into an unsigned long
internally, not even with a type cast.)  However, not enabling
optimization for them yields garbage timing anyway, due to moving the
compile-time constant floating-point calculations from the compiler
into the AVR.


Changed paths:

Path Details
Directorytrunk/avr-libc/configure.ac modified , text changed
Directorytrunk/avr-libc/include/avr/Makefile.am modified , text changed
Directorytrunk/avr-libc/include/avr/builtins.h.in added
Directorytrunk/avr-libc/include/util/Makefile.am modified , text changed
Directorytrunk/avr-libc/include/util/delay.h deleted
Directorytrunk/avr-libc/include/util/delay.h.in
(Copied from trunk/avr-libc/include/util/delay.h, r2102)
added , text changed

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.5