[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] Timers in 2.x
David Gay
dgay42 at gmail.com
Tue Oct 18 13:52:58 PDT 2005
On 10/18/05, Joe Polastre <joe at polastre.com> wrote:
> > - I'd like to suggest merging the components which offer the Alarm and
> > Counter interfaces (this basically means cutting the number of
> > components above by two). We would keep the option of using a hardware
> > timer as a Counter only, though.
>
> I'd actually propose the opposite. For example, having
> Alarm32khz32bitC and Alarm32khz16bitC instead of Alarm32khzC allows
> you to not include 32-bit libraries if you're only using a 16-bit
> alarm. This saves significant code space, since the 32bitC component
> isn't included and neither are the 32-bit arithmetic operations within
> it.
I wasn't suggesting merging the original hardware alarm and the
transformed one, only merging the alarm and counters at each level
(see below about why this isn't a code space issue).
> By keeping Alarm and Counter separate, you save space too.
Transformed alarms use the counter, so there's no gain there. And at
the lowest level, including both doesn't cost either because dead-code
elimination will remove the part which isn't used... That only leaves
transformed counters where the alarm isn't used (which I suggested
leaving around).
All of this is of course up to each platform, but I do think the
plethora of components is confusing to users...
David
_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg
More information about the Tinyos-host-mote-wg
mailing list