[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] timer.h
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] timer.h |
Date: |
Mon, 30 Sep 2002 18:14:01 +0200 |
User-agent: |
Mutt/1.2.5i |
As E. Weddington wrote:
> > IMHO, we should drop this file. It's incomplete enough so i doubt
> > anybody is actually using it at all.
> >
> > Opinions?
> >
>
> Please, drop it.
Would anybody here object?
> Or, make it totally complete and worthwhile to use.
IMHO, it's hard to even make it `complete', since the notion of
completeness might vary much between different environments. Also,
newer ATmegas use different names for the bit descriptions.
> I'm sure that there would be people interested in
> a timer module. If AVRGCC doesn't provide it, they'll have to roll
> their own anyway. If AVRGCC does provide it, then it will save
> programming time.
Well, since all the contained functions are one-liners anyway, i guess
the need to rewrite them is not more than just the "programmer's
warm-up" before actually starting even the simplest AVR project. ;-)
> I have some code that might be a starting point for a timer module.
In what sense?
I've got a timer module as well, but one that's fairly hardware
independent. I need to polish it up a bit, and will post it here.
Basically, it's an implementation for one-shot timers that can trigger
a callback function, and that also can be cancelled before they are
expired. (Repeated timers can easily be achieved by re-adding a new
timer event within the callback.) Hardware independence is maintained
by simply providing a function timertick() that needs to be called by
an actual timer interrupt service. (In the application i wrote this
for, the timer ISR does a bit more than only calling this function,
e. g. it fetches the current value of another counter channel into a
temporary variable since this action is time-critical.)
I intent to at least supply these functions for the "examples" section
of the avr-libc documentation.
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/
- [avr-libc-dev] [RFC] Boot Loader Support, E. Weddington, 2002/09/09
- Re: [avr-libc-dev] [RFC] Boot Loader Support, ken restivo, 2002/09/09
- [avr-libc-dev] timer.h, Chris Baugher, 2002/09/15
- Re: [avr-libc-dev] timer.h, E. Weddington, 2002/09/16
- Re: [avr-libc-dev] timer.h, Joerg Wunsch, 2002/09/30
- Re: [avr-libc-dev] timer.h, E. Weddington, 2002/09/30
- Re: [avr-libc-dev] timer.h,
Joerg Wunsch <=
- Re: [avr-libc-dev] timer.h, E. Weddington, 2002/09/30
- Re: [avr-libc-dev] timer.h, Theodore A. Roth, 2002/09/30
- Re: [avr-libc-dev] timer.h, E. Weddington, 2002/09/30
- Re: [avr-libc-dev] timer.h, Theodore A. Roth, 2002/09/30
- Re: [avr-libc-dev] release (was timer.h), E. Weddington, 2002/09/30
- Re: [avr-libc-dev] release (was timer.h), Theodore A. Roth, 2002/09/30
- Re: [avr-libc-dev] timer.h, Theodore A. Roth, 2002/09/30
- Re: [avr-libc-dev] timer.h, E. Weddington, 2002/09/30
- Re: [avr-libc-dev] timer.h, Chris Baugher, 2002/09/30