From df85f0e666836fed89b9bdf6f4c1418e2b00d5ba Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 22 Nov 2010 17:34:04 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2418 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/pwm_lld.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'os/hal') 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. -- cgit v1.2.3