[2.0.x] HAL timer set/get count => set/get compare (#9581)
To reduce confusion over the current timer count vs. the compare (aka "top") value. Caution: this re-uses the function name, changing its meaning.
This commit is contained in:
@ -147,10 +147,10 @@ extern "C" {
|
||||
#define HAL_timer_start(timer_num, frequency)
|
||||
|
||||
#define _CAT(a, ...) a ## __VA_ARGS__
|
||||
#define HAL_timer_set_count(timer, count) (_CAT(TIMER_OCR_, timer) = count)
|
||||
#define HAL_timer_get_count(timer) _CAT(TIMER_OCR_, timer)
|
||||
#define HAL_timer_set_current_count(timer, count) (_CAT(TIMER_COUNTER_, timer) = count)
|
||||
#define HAL_timer_get_current_count(timer) _CAT(TIMER_COUNTER_, timer)
|
||||
#define HAL_timer_set_compare(timer, compare) (_CAT(TIMER_OCR_, timer) = compare)
|
||||
#define HAL_timer_get_compare(timer) _CAT(TIMER_OCR_, timer)
|
||||
#define HAL_timer_set_count(timer, count) (_CAT(TIMER_COUNTER_, timer) = count)
|
||||
#define HAL_timer_get_count(timer) _CAT(TIMER_COUNTER_, timer)
|
||||
|
||||
#define HAL_timer_isr_prologue(timer_num)
|
||||
|
||||
|
Reference in New Issue
Block a user