[U-Boot] [RFC][Timer API] Revised Specification - Implementation details
Wolfgang Denk
wd at denx.de
Tue May 31 08:03:02 CEST 2011
Dear Graeme Russ,
In message <BANLkTikZUkk1EaYqCg=5mB2npva2iE6Lew at mail.gmail.com> you wrote:
>
> Don't forget the API will have a get_current_ms() so we can do duration
I don't think we will have this.
We have get_timer() (or, as recently suggested, renamed it into
time_read() or similar). We don't need yet another function that
dioes the same just by a different name.
> bypassing the resolution correction. If time_reached() did the resolution
> correction, would this solve the problem of API misuse (yes, I know it puts
> a complicated calculation back in the loop)
Complicated? Come on, guys.
And please don't forget thatthese are usually delay or timeout loops,
so who cares how long it takes?
> Yetch! - We will not be exposing ticks!
Oh, I'm no so sure about this. We will not use it in common code, but
the interface should be available for special purposes.
> I like simple as much as the next guy - I also like hard to misuse ;)
NAK. What you today consider "misuse" might actually be a clever
solution to my problem tomorrow.
An SPI is good then the standard solution actually covers 99.9% of all
use cases and is so convenient to use that you don't even think about
doing it differently. But it is extremely useful when you also can
use it for things the designer/implementor never even dreamt of.
So don't try to prevent "misuse".
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
core error - bus dumped
More information about the U-Boot
mailing list