diff --git a/src/platforms/rp2040.h b/src/platforms/rp2040.h index af94e12..fa6b69e 100644 --- a/src/platforms/rp2040.h +++ b/src/platforms/rp2040.h @@ -31,7 +31,7 @@ void setTimer(uint32_t us_interval) { cancel_repeating_timer(&timer); - // todo: actually should be -init_clock so that timer is set to start init_clock us after last tick, instead of init_clock us after finished processing last tick! + // todo: actually should be -us_interval so that timer is set to start init_clock us after last tick, instead of init_clock us after finished processing last tick! add_repeating_timer_us(us_interval, &handlerISR, NULL, &timer); } #else @@ -91,7 +91,7 @@ void setTimer(uint32_t us_interval) { cancel_repeating_timer(&timer); - // todo: actually should be -init_clock so that timer is set to start init_clock us after last tick, instead of init_clock us after finished processing last tick! + // todo: actually should be -us_interval so that timer is set to start init_clock us after last tick, instead of init_clock us after finished processing last tick! add_repeating_timer_us(us_interval, &handlerISR, NULL, &timer); }