Followup to HAL_timer_restrain

Followup to #9985
This commit is contained in:
Scott Lahteine
2018-03-07 22:18:13 -06:00
parent 03e3011332
commit 98d48fc731
8 changed files with 21 additions and 21 deletions

View File

@ -150,7 +150,7 @@ extern "C" {
#define _CAT(a, ...) a ## __VA_ARGS__
#define HAL_timer_set_compare(timer, compare) (_CAT(TIMER_OCR_, timer) = compare)
#define HAL_timer_restrain(timer, interval_us) NOLESS(_CAT(TIMER_OCR_, timer), _CAT(TIMER_COUNTER_, timer) + interval_us * HAL_TICKS_PER_US)
#define HAL_timer_restrain(timer, interval_ticks) NOLESS(_CAT(TIMER_OCR_, timer), _CAT(TIMER_COUNTER_, timer) + interval_ticks)
#define HAL_timer_get_compare(timer) _CAT(TIMER_OCR_, timer)
#define HAL_timer_get_count(timer) _CAT(TIMER_COUNTER_, timer)