aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-03-05 10:36:34 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-03-05 10:36:34 +0000
commit712ecf57f92786cded15efb214e3eea76ed0332a (patch)
tree75b9b6b7a577f324d4a48eaff9009a0fa873e2ba /os/hal/ports
parent7bd5e871890415c27fa14b360ea7b2651c5fd659 (diff)
downloadChibiOS-712ecf57f92786cded15efb214e3eea76ed0332a.tar.gz
ChibiOS-712ecf57f92786cded15efb214e3eea76ed0332a.tar.bz2
ChibiOS-712ecf57f92786cded15efb214e3eea76ed0332a.zip
Fixed bug #722.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9014 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports')
-rw-r--r--os/hal/ports/STM32/LLD/TIMv1/pwm_lld.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.c b/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.c
index 748675885..767cd52a7 100644
--- a/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.c
+++ b/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.c
@@ -708,7 +708,7 @@ void pwm_lld_enable_channel(PWMDriver *pwmp,
#if STM32_TIM_MAX_CHANNELS <= 4
pwmp->tim->CCR[channel] = width;
#else
- if (channel <= 4)
+ if (channel < 4)
pwmp->tim->CCR[channel] = width;
else
pwmp->tim->CCXR[channel - 4] = width;
@@ -733,7 +733,7 @@ void pwm_lld_disable_channel(PWMDriver *pwmp, pwmchannel_t channel) {
pwmp->tim->CCR[channel] = 0;
pwmp->tim->DIER &= ~(2 << channel);
#else
- if (channel <= 4) {
+ if (channel < 4) {
pwmp->tim->CCR[channel] = 0;
pwmp->tim->DIER &= ~(2 << channel);
}