> -----Original Message-----
> From: Bill Perry [mailto:invalid.nore...@gnu.org] 
> Sent: Monday, August 17, 2009 3:41 PM
> To: Joerg Wunsch; Bill Perry; Weddington, Eric; 
> avr-libc-dev@nongnu.org
> Subject: [bug #17216] change to the ../util/delay.h header 
> for increased functionality
> 
> 
> Follow-up Comment #3, bug #17216 (project avr-libc):
> 
> Is is possible to move this forward?
> 
> The existing delay macros/functions do have problems.
> 

Hi Bill,

There is a patch to the GCC toolchain, which has been included in the last two 
releases of WinAVR, that provides new builtin functions, including a function 
that will delay a specified number of cycles:

extern void __builtin_avr_delay_cycles(unsigned long __n);

The parameter to this function is an unsigned long which is an unsigned 32-bit 
number of cycles to delay. When you use this function in your application, GCC 
will replace the function with "do-nothing" assembly code that will delay the 
specified number of cycles.

This function has not been widely advertised, but it should work for you. 
Perhaps this will help you in your search for a better delay.

Eric Weddington


_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to