Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setPrescaler() not working #32

Open
vindar opened this issue Sep 12, 2024 · 0 comments
Open

setPrescaler() not working #32

vindar opened this issue Sep 12, 2024 · 0 comments

Comments

@vindar
Copy link

vindar commented Sep 12, 2024

Hi Luni64,

It looks the implementation of the setPrescaler() method is broken. I am trying to use use specifically with TMR timers.

  1. Making a call to the method yields a linker error because BaseTimer::setPrescaler() is defined as inline but implemented in the compilation unit BaseTimer.cpp c.f. also this pull request.
  2. Also it looks like the current implementation of BaseTimer::setPrescaler() just set this->prescaler = psc but I suppose it should also call timerChannel->setPrescaler() no ?
  3. In order to do so, TMRChannel::setPrescaler() must override the method in the base class ITimerChannel but, as it currently stands, TMRChannel::setPrescaler() and ITimerChannel::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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant