TeensyTimerTool
TeensyTimerTool copied to clipboard
setPrescaler() not working
Hi Luni64,
It looks the implementation of the setPrescaler()
method is broken. I am trying to use use specifically with TMR timers.
- Making a call to the method yields a linker error because
BaseTimer::setPrescaler()
is defined asinline
but implemented in the compilation unitBaseTimer.cpp
c.f. also this pull request. - Also it looks like the current implementation of
BaseTimer::setPrescaler()
just setthis->prescaler = psc
but I suppose it should also calltimerChannel->setPrescaler()
no ? - In order to do so,
TMRChannel::setPrescaler()
must override the method in the base classITimerChannel
but, as it currently stands,TMRChannel::setPrescaler()
andITimerChannel::setPrescaler()
have different signature...
I realize there are many more caveats which I do not see but do you think it is possible to get the setPrescaler()
method working, at least for TMR ? I know I can change the psc it the config file but I would like to be able to adjust it at runtime. Thanks !