aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/pwm_lld.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-22 17:34:04 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-22 17:34:04 +0000
commitdf85f0e666836fed89b9bdf6f4c1418e2b00d5ba (patch)
tree4c2c8373416a7c462b12fada023ea20c8e64b510 /os/hal/platforms/STM32/pwm_lld.h
parent2c644359b52493357f87100afaecb8596eaa2ea3 (diff)
downloadChibiOS-df85f0e666836fed89b9bdf6f4c1418e2b00d5ba.tar.gz
ChibiOS-df85f0e666836fed89b9bdf6f4c1418e2b00d5ba.tar.bz2
ChibiOS-df85f0e666836fed89b9bdf6f4c1418e2b00d5ba.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2418 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/pwm_lld.h')
-rw-r--r--os/hal/platforms/STM32/pwm_lld.h4
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.