diff options
Diffstat (limited to 'os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.h')
-rw-r--r-- | os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.h b/os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.h index 16762f38a..f453243cb 100644 --- a/os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.h +++ b/os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.h @@ -541,8 +541,8 @@ struct GPTDriver { *
* @notapi
*/
-#define gpt_lld_change_interval(gptp, interval) \
- ((gptp)->tim->ARR = (uint32_t)((interval) - 1))
+#define gpt_lld_change_interval(gptp, interval) \
+ ((gptp)->tim->ARR = (uint32_t)(interval))
/**
* @brief Returns the interval of GPT peripheral.
@@ -553,7 +553,7 @@ struct GPTDriver { *
* @notapi
*/
-#define gpt_lld_get_interval(gptp) ((gptcnt_t)(gptp)->tim->ARR + 1)
+#define gpt_lld_get_interval(gptp) ((gptcnt_t)(gptp)->tim->ARR)
/**
* @brief Returns the counter value of GPT peripheral.
|