Skip to content

setPrescaler() not working  #32

@vindar

Description

@vindar

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 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions