I know I shouldn't be doing this, but I noticed that BaseTimer::start and BaseTimer::stop use the timerChannel pointer without checking them; I would expect them to return errorCode::notInitialized if it isn't set yet.
Test to reproduce crashes:
#include <TeensyTimerTool.h>
TeensyTimerTool::PeriodicTimer t1;
void begin() {
t1.start(); // Dies here without progressing (expected seg fault)
// Rest of code
}
I know I shouldn't be doing this, but I noticed that
BaseTimer::start
andBaseTimer::stop
use thetimerChannel
pointer without checking them; I would expect them to returnerrorCode::notInitialized
if it isn't set yet.Test to reproduce crashes: