diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-04-24 11:31:52 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-04-24 11:31:52 +0000 |
commit | e28a45245cae96beaa746ea22802185c44bd2fd5 (patch) | |
tree | 841ebc067c3ad01676b9f131d0df7b9bc24c275b | |
parent | 5ba4cc9696ec19eb91db95df83b206ba05337c70 (diff) | |
download | ChibiOS-e28a45245cae96beaa746ea22802185c44bd2fd5.tar.gz ChibiOS-e28a45245cae96beaa746ea22802185c44bd2fd5.tar.bz2 ChibiOS-e28a45245cae96beaa746ea22802185c44bd2fd5.zip |
Fixed bug #487.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6883 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/include/pwm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/os/hal/include/pwm.h b/os/hal/include/pwm.h index a735cfbc2..4ece68d70 100644 --- a/os/hal/include/pwm.h +++ b/os/hal/include/pwm.h @@ -118,8 +118,8 @@ typedef void (*pwmcallback_t)(PWMDriver *pwmp); * @api
*/
#define PWM_FRACTION_TO_WIDTH(pwmp, denominator, numerator) \
- ((uint16_t)((((uint32_t)(pwmp)->period) * \
- (uint32_t)(numerator)) / (uint32_t)(denominator)))
+ ((pwmcnt_t)((((pwmcnt_t)(pwmp)->period) * \
+ (pwmcnt_t)(numerator)) / (pwmcnt_t)(denominator)))
/**
* @brief Converts from degrees to pulse width.
|