[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] simulavrxx timers

From: Klaus Rudolph
Subject: Re: [Simulavr-devel] simulavrxx timers
Date: Tue, 27 May 2008 08:25:55 +0200
User-agent: Thunderbird (Windows/20080421)

Hi Michael,

If I understand the timer classes correctly,
HWMegaTimer0::t0_old is unused.
It is used and gives the "old" / last state from the pin.

HWMegaTimer0 doesn't have pin_t0.
Is this correct?
See above :-)

Timer0 in an atmega168 doesn't have quite the same
set of features as any atmega128 timer.
That will require me to write another timer class.

I have not looked inside the newer devices but it is maybe necessary to write a timer class from scratch.

My thought is to write global timer feature classes,
e.g. output compare,
and build nested timer classes from the feature classes.

A long time ago I thought that some more generic classes and inheritance could solve many problems. But after looking in the details this plan was knocked out. To have to many switch/if inside the class for specialization costs to much runtime I think.

But I have actually no experience with the newer avr's so it is up to you to make a more general design for the newer devices.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]