diff options
Diffstat (limited to 'os/hal/platforms/STM32/pwm_lld.h')
-rw-r--r-- | os/hal/platforms/STM32/pwm_lld.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32/pwm_lld.h b/os/hal/platforms/STM32/pwm_lld.h index 194e60b48..6da57f5e1 100644 --- a/os/hal/platforms/STM32/pwm_lld.h +++ b/os/hal/platforms/STM32/pwm_lld.h @@ -283,8 +283,8 @@ struct PWMDriver { * @api
*/
#define PWM_FRACTION_TO_WIDTH(pwmp, numerator, denominator) \
- ((uint16_t)(((((uint32_t)(pwmp)->pd_config->pc_arr + 1UL) * \
- (uint32_t)(denominator)) / (uint32_t)(numerator)) - 1UL))
+ ((uint16_t)((((uint32_t)(pwmp)->pd_config->pc_arr + 1UL) * \
+ (uint32_t)(denominator)) / (uint32_t)(numerator)))
/**
* @brief Converts from degrees to pulse width.
|