diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-10-25 18:48:13 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-10-25 18:48:13 +0000 |
commit | 61922d458b3032cca129b795c430eee089864a43 (patch) | |
tree | a90de6bab2995213bfcbef1e3daec181fa2ddcb2 /os/hal/platforms/STM32/pwm_lld.h | |
parent | 63b9ef1051977ed1272df94915a2fd3fa4318aa0 (diff) | |
download | ChibiOS-61922d458b3032cca129b795c430eee089864a43.tar.gz ChibiOS-61922d458b3032cca129b795c430eee089864a43.tar.bz2 ChibiOS-61922d458b3032cca129b795c430eee089864a43.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2291 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/pwm_lld.h')
-rw-r--r-- | os/hal/platforms/STM32/pwm_lld.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/os/hal/platforms/STM32/pwm_lld.h b/os/hal/platforms/STM32/pwm_lld.h index 761c3af39..f512f08d6 100644 --- a/os/hal/platforms/STM32/pwm_lld.h +++ b/os/hal/platforms/STM32/pwm_lld.h @@ -21,7 +21,7 @@ * @file STM32/pwm_lld.h
* @brief STM32 PWM subsystem low level driver header.
*
- * @addtogroup STM32_PWM
+ * @addtogroup PWM
* @{
*/
@@ -269,8 +269,8 @@ struct PWMDriver { *
* @api
*/
-#define PWM_DEGREES_TO_WIDTH(pwpm, degrees) \
- ((uint16_t)(((((uint32_t)(pwpm)->pd_config->pc_arr + 1UL) * \
+#define PWM_DEGREES_TO_WIDTH(pwmp, degrees) \
+ ((uint16_t)(((((uint32_t)(pwmp)->pd_config->pc_arr + 1UL) * \
(uint32_t)(degrees)) / 36000UL) - 1UL))
/**
@@ -286,8 +286,8 @@ struct PWMDriver { *
* @api
*/
-#define PWM_PERCENTAGE_TO_WIDTH(pwpm, percentage) \
- ((uint16_t)(((((uint32_t)(pwpm)->pd_config->pc_arr + 1UL) * \
+#define PWM_PERCENTAGE_TO_WIDTH(pwmp, percentage) \
+ ((uint16_t)(((((uint32_t)(pwmp)->pd_config->pc_arr + 1UL) * \
(uint32_t)(percentage)) / 10000UL) - 1UL))
/*===========================================================================*/
|