This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: accurate ms delay
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: Jani Monoses <jani at iv dot ro>
- Cc: eCos Discuss <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 03 Apr 2002 19:30:13 +0100
- Subject: Re: [ECOS] accurate ms delay
- Organization: Red Hat UK Ltd.
- References: <Pine.LNX.4.33L2.0203081324100.15405-100000@cow> <1016003248.12756.33.camel@thinktwice.zoftcorp.dk>
Jesper Skov wrote:
>
> On Fri, 2002-03-08 at 12:26, Jani Monoses wrote:
> >
> > Is it OK to use hal_delay_us in a generic .inl driver instead of the
> > not-too-accurate for loops?
>
> Yes, it's always a preference over for loops. Just be carefull to not
> delay with the interrupts disabled.
And obviously it can be no more accurate than the resolution of the clock
device feeding it.
> >Is this function guarranteed to be implemented
> > by every platform?
>
> Yes - there is a fall-back implementation that is just a for-loop. So
> accuracy is not guaranteed. But since RedBoot rely on the function, it's
> available (and fairly accurate) on most platforms.
Although having a fallback has problems when it works "good enough" most
times and it's only in QA for customer releases that we sometimes find it
hasn't been implemented!
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss