aboutsummaryrefslogtreecommitdiffstats
path: root/os
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
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')
-rw-r--r--os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c14
-rw-r--r--os/rt/src/chschd.c4
2 files changed, 16 insertions, 2 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:
;
}
diff --git a/os/rt/src/chschd.c b/os/rt/src/chschd.c
index d4bf1cafa..476b19836 100644
--- a/os/rt/src/chschd.c
+++ b/os/rt/src/chschd.c
@@ -332,11 +332,11 @@ static void wakeup(void *p) {
#if CH_CFG_USE_SEMAPHORES == TRUE
case CH_STATE_WTSEM:
chSemFastSignalI(tp->u.wtsemp);
- /* Falls into, intentional. */
+ /* Falls through.*/
#endif
#if (CH_CFG_USE_CONDVARS == TRUE) && (CH_CFG_USE_CONDVARS_TIMEOUT == TRUE)
case CH_STATE_WTCOND:
- /* Falls into, intentional. */
+ /* Falls through.*/
#endif
case CH_STATE_QUEUED:
/* States requiring dequeuing.*/