aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-11-23 12:46:15 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-11-23 12:46:15 +0000
commit85a36d3767152dd571f5ca8e8001ce66f3803f13 (patch)
tree78042f8caeffefcc120f07edc9c69d13907f5559 /os/hal
parent71b7be3d452756b85d4d05876a1e1c16ee62558c (diff)
downloadChibiOS-85a36d3767152dd571f5ca8e8001ce66f3803f13.tar.gz
ChibiOS-85a36d3767152dd571f5ca8e8001ce66f3803f13.tar.bz2
ChibiOS-85a36d3767152dd571f5ca8e8001ce66f3803f13.zip
Fixed bug #906.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11067 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c b/os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c
index 66fd15df7..279170e16 100644
--- a/os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c
+++ b/os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c
@@ -519,32 +519,40 @@ void pwm_lld_start(PWMDriver *pwmp) {
switch (pwmp->config->channels[0].mode & PWM_OUTPUT_MASK) {
case PWM_OUTPUT_ACTIVE_LOW:
ccer |= STM32_TIM_CCER_CC1P;
+ /* Falls through.*/
case PWM_OUTPUT_ACTIVE_HIGH:
ccer |= STM32_TIM_CCER_CC1E;
+ /* Falls through.*/
default:
;
}
switch (pwmp->config->channels[1].mode & PWM_OUTPUT_MASK) {
case PWM_OUTPUT_ACTIVE_LOW:
ccer |= STM32_TIM_CCER_CC2P;
+ /* Falls through.*/
case PWM_OUTPUT_ACTIVE_HIGH:
ccer |= STM32_TIM_CCER_CC2E;
+ /* Falls through.*/
default:
;
}
switch (pwmp->config->channels[2].mode & PWM_OUTPUT_MASK) {
case PWM_OUTPUT_ACTIVE_LOW:
ccer |= STM32_TIM_CCER_CC3P;
+ /* Falls through.*/
case PWM_OUTPUT_ACTIVE_HIGH:
ccer |= STM32_TIM_CCER_CC3E;
+ /* Falls through.*/
default:
;
}
switch (pwmp->config->channels[3].mode & PWM_OUTPUT_MASK) {
case PWM_OUTPUT_ACTIVE_LOW:
ccer |= STM32_TIM_CCER_CC4P;
+ /* Falls through.*/
case PWM_OUTPUT_ACTIVE_HIGH:
ccer |= STM32_TIM_CCER_CC4E;
+ /* Falls through.*/
default:
;
}
@@ -561,24 +569,30 @@ void pwm_lld_start(PWMDriver *pwmp) {
switch (pwmp->config->channels[0].mode & PWM_COMPLEMENTARY_OUTPUT_MASK) {
case PWM_COMPLEMENTARY_OUTPUT_ACTIVE_LOW:
ccer |= STM32_TIM_CCER_CC1NP;
+ /* Falls through.*/
case PWM_COMPLEMENTARY_OUTPUT_ACTIVE_HIGH:
ccer |= STM32_TIM_CCER_CC1NE;
+ /* Falls through.*/
default:
;
}
switch (pwmp->config->channels[1].mode & PWM_COMPLEMENTARY_OUTPUT_MASK) {
case PWM_COMPLEMENTARY_OUTPUT_ACTIVE_LOW:
ccer |= STM32_TIM_CCER_CC2NP;
+ /* Falls through.*/
case PWM_COMPLEMENTARY_OUTPUT_ACTIVE_HIGH:
ccer |= STM32_TIM_CCER_CC2NE;
+ /* Falls through.*/
default:
;
}
switch (pwmp->config->channels[2].mode & PWM_COMPLEMENTARY_OUTPUT_MASK) {
case PWM_COMPLEMENTARY_OUTPUT_ACTIVE_LOW:
ccer |= STM32_TIM_CCER_CC3NP;
+ /* Falls through.*/
case PWM_COMPLEMENTARY_OUTPUT_ACTIVE_HIGH:
ccer |= STM32_TIM_CCER_CC3NE;
+ /* Falls through.*/
default:
;
}