aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-21 13:45:22 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-21 13:45:22 +0000
commit32e43fdb02ddb7582866c29dad5e6c87f3315605 (patch)
tree3bed10e4984bde1900b7f451f4d6d70b005a75be /os/hal/src
parent2847f7574d257886e31c8f6d96bfebc82c2b4ee5 (diff)
downloadChibiOS-32e43fdb02ddb7582866c29dad5e6c87f3315605.tar.gz
ChibiOS-32e43fdb02ddb7582866c29dad5e6c87f3315605.tar.bz2
ChibiOS-32e43fdb02ddb7582866c29dad5e6c87f3315605.zip
Fixed bug 3114481.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2409 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src')
-rw-r--r--os/hal/src/pwm.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c
index 79cc73b30..ecf9eba3f 100644
--- a/os/hal/src/pwm.c
+++ b/os/hal/src/pwm.c
@@ -117,8 +117,9 @@ void pwmStop(PWMDriver *pwmp) {
* @details Programs (or reprograms) a PWM channel.
*
* @param[in] pwmp pointer to a @p PWMDriver object
- * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1])
- * @param[in] width PWM pulse width as clock pulses number
+ * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1)
+ * @param[in] width PWM pulse width as clock pulses number, setting the
+ * width at zero is equivalent to disabling the channel
*
* @api
*/
@@ -132,17 +133,17 @@ void pwmEnableChannel(PWMDriver *pwmp,
chSysLock();
chDbgAssert(pwmp->pd_state == PWM_READY,
"pwmEnableChannel(), #1", "not ready");
- pwm_lld_enable_channel(pwmp, channel, width);
+ pwm_lld_set_channel(pwmp, channel, width);
chSysUnlock();
}
/**
- * @brief Disables a PWM channel.
+ * @brief Disables a PWM channel.
* @details The channel is disabled and its output line returned to the
* idle state.
*
* @param[in] pwmp pointer to a @p PWMDriver object
- * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1])
+ * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1)
*
* @api
*/
@@ -154,7 +155,7 @@ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) {
chSysLock();
chDbgAssert(pwmp->pd_state == PWM_READY,
"pwmDisableChannel(), #1", "not ready");
- pwm_lld_disable_channel(pwmp, channel);
+ pwm_lld_set_channel(pwmp, channel, 0);
chSysUnlock();
}