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.

Thanks
 Klaus




_______________________________________________
Simulavr-devel mailing list
Simulavr-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/simulavr-devel

Reply via email to