[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-libc-dev] Re: [bug #17216] change to the ../util/delay.h header
From: |
Weddington, Eric |
Subject: |
RE: [avr-libc-dev] Re: [bug #17216] change to the ../util/delay.h header for increased functionality |
Date: |
Sun, 6 Mar 2011 13:49:45 -0700 |
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Joerg Wunsch
> Sent: Sunday, March 06, 2011 12:14 PM
> To: Bill Perry; address@hidden
> Subject: [avr-libc-dev] Re: [bug #17216] change to the ../util/delay.h
> header for increased functionality
>
> As Bill Perry wrote:
>
> > The only thing left (for me) is the possibility of adding a
> > _delay_ns() function.
>
> Are you willing to submit that as a patch against the current SVN
> version?
>
> If so, please don't forget the documentation (which is just the
> doxygen comment on top of it). The documentation should clearly point
> out the limits in the applicability of this function, so it's
> immediately obvious that nobody could expect a 12.5 ns delay on a CPU
> clocked with 1 MHz. ;-)
I question the whole viability of a _delay_ns() function. If someone wants a
resolution that small, then they should be able to do the calculation and use
the __builtin_avr_delay_cycles() builtin function instead. It should be no more
than a few cycles anyway at the clock rates that we're talking about.