Open christophepersoz opened 8 months ago
To call the constructor of a variable that is a member of a class, pass the constructor parameters in the member initialization list. For example, if you want to use the GPT1 module, it would look like this
class Blinker
{
public:
Blinker(unsigned _pin, unsigned _period) // add blink period to the constructor
: timer(GPT1) //<<====
{
pin = _pin;
period = _period;
}`
...
protected:
PeriodicTimer timer;
...
}
Hi Luna, Thanks a lot. I dis found that much later yesterday.
Thanks a lot!
Hi Luna,
Thanks for your TeensyTimerTool, this is a super library.
I was reading your callback examples and discovered the part where you are encapsulating and use this library in an another class, Blinker.h as an example. Is that possible to specify in a such use the kind of timer you want to use for each blinker? (TCK, TCK_RTC, and so...).
Thanks a lot, Christophe