|
|
@ -109,8 +109,8 @@ FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) { |
|
|
|
return pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_CV; |
|
|
|
} |
|
|
|
|
|
|
|
FORCE_INLINE static void HAL_timer_restrain(const uint8_t timer_num, const uint16_t interval_µs) { |
|
|
|
const hal_timer_t mincmp = HAL_timer_get_count(timer_num) + interval_µs * HAL_TICKS_PER_US; |
|
|
|
FORCE_INLINE static void HAL_timer_restrain(const uint8_t timer_num, const uint16_t interval_us) { |
|
|
|
const hal_timer_t mincmp = HAL_timer_get_count(timer_num) + interval_us * HAL_TICKS_PER_US; |
|
|
|
if (HAL_timer_get_compare(timer_num) < mincmp) HAL_timer_set_compare(timer_num, mincmp); |
|
|
|
} |
|
|
|
|
|
|
|