• R/O
  • SSH
  • HTTPS

chibios: 提交


Commit MetaInfo

修订版6881 (tree)
时间2014-04-24 20:31:48
作者gdisirio

Log Message

Fixed bug #487.

更改概述

差异

--- branches/stable_2.4.x/os/hal/include/pwm.h (revision 6880)
+++ branches/stable_2.4.x/os/hal/include/pwm.h (revision 6881)
@@ -125,8 +125,8 @@
125125 * @api
126126 */
127127 #define PWM_FRACTION_TO_WIDTH(pwmp, denominator, numerator) \
128- ((uint16_t)((((uint32_t)(pwmp)->period) * \
129- (uint32_t)(numerator)) / (uint32_t)(denominator)))
128+ ((pwmcnt_t)((((pwmcnt_t)(pwmp)->period) * \
129+ (pwmcnt_t)(numerator)) / (pwmcnt_t)(denominator)))
130130
131131 /**
132132 * @brief Converts from degrees to pulse width.
--- branches/stable_2.4.x/readme.txt (revision 6880)
+++ branches/stable_2.4.x/readme.txt (revision 6881)
@@ -79,6 +79,7 @@
7979 *****************************************************************************
8080
8181 *** 2.4.6 ***
82+- FIX: Fixed invalid cast in PWM_FRACTION_TO_WIDTH() macro (bug #487).
8283 - FIX: Fixed spurious callback in ICU driver (bug #461).
8384 - FIX: Fixed wrong vector names for STM32Lxx.
8485 - FIX: Fixed wrong MCO2 check in STM32F4xx HAL driver (bug #447).
Show on old repository browser