diff --git a/teensy4/IntervalTimer.h b/teensy4/IntervalTimer.h index 60288255..ebd1f17a 100644 --- a/teensy4/IntervalTimer.h +++ b/teensy4/IntervalTimer.h @@ -70,15 +70,6 @@ class IntervalTimer { // Change the timer's interval. The current interval is completed // as previously configured, and then the next interval begins with // with this new setting. - void update(unsigned int microseconds) { - if (microseconds == 0 || microseconds > MAX_PERIOD) return; - uint32_t cycles = (24000000 / 1000000) * microseconds - 1; - if (cycles < 17) return; - if (channel) channel->LDVAL = cycles; - } - // Change the timer's interval. The current interval is completed - // as previously configured, and then the next interval begins with - // with this new setting. template void update(period_t period){ uint32_t cycles = cyclesFromPeriod(period); @@ -121,7 +112,7 @@ class IntervalTimer { template uint32_t cyclesFromPeriod(period_t period) { static_assert(std::is_arithmetic_v, "Period must be arithmetic"); - + if (period < 0 || period > MAX_PERIOD) return 0; if constexpr (std::is_integral_v) // handles all integral types