Hi all,
I am really enjoying the teensy 4.0 using teensyduino and arduino 1.8.13.
I am looking to use IntervalTimer to call a functor. There may be some ways around this that I am currently exploring, but I am thinking simply changing the argument on lines 50, 56 etc of IntervalTimer.h to accept functors will be the easiest.
Any thoughts about how to put a template in the .h file so
can be something like
??
or pass functor as f-pointer?
Thanks,
JD
I am really enjoying the teensy 4.0 using teensyduino and arduino 1.8.13.
I am looking to use IntervalTimer to call a functor. There may be some ways around this that I am currently exploring, but I am thinking simply changing the argument on lines 50, 56 etc of IntervalTimer.h to accept functors will be the easiest.
Any thoughts about how to put a template in the .h file so
Code:
bool begin(void (*funct)(), unsigned long microseconds) {
return begin(funct, (unsigned int)microseconds);
}
can be something like
Code:
bool begin(FunctorType functor, unsigned long microseconds) {
return begin(funct, (unsigned int)microseconds);
}
??
or pass functor as f-pointer?
Thanks,
JD