From a1bd228c87d1b73f6cfecf000eec0a8765a11b01 Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Fri, 28 Jan 2011 15:11:52 -0800 Subject: Replaced OC mode selection with an enum, makes it simpler to use. --- examples/stm32/stm32-h103/pwm_6step/pwm_6step.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/stm32/stm32-h103') diff --git a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c b/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c index b35a4ba..d769e3a 100644 --- a/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c +++ b/examples/stm32/stm32-h103/pwm_6step/pwm_6step.c @@ -104,7 +104,7 @@ void tim_setup(void) timer_disable_oc_clear(TIM1, TIM_OC1); timer_enable_oc_preload(TIM1, TIM_OC1); timer_set_oc_slow_mode(TIM1, TIM_OC1); - timer_set_oc_mode(TIM1, TIM_OC1, TIM_CCMR1_OC1M_PWM1); + timer_set_oc_mode(TIM1, TIM_OC1, TIM_OCM_PWM1); /* Configure OC1. */ timer_set_oc_polarity_high(TIM1, TIM_OC1); @@ -131,7 +131,7 @@ void tim_setup(void) timer_disable_oc_clear(TIM1, TIM_OC2); timer_enable_oc_preload(TIM1, TIM_OC2); timer_set_oc_slow_mode(TIM1, TIM_OC2); - timer_set_oc_mode(TIM1, TIM_OC2, TIM_CCMR1_OC2M_PWM1); + timer_set_oc_mode(TIM1, TIM_OC2, TIM_OCM_PWM1); /* Configure OC2. */ timer_set_oc_polarity_high(TIM1, TIM_OC2); @@ -158,7 +158,7 @@ void tim_setup(void) timer_disable_oc_clear(TIM1, TIM_OC3); timer_enable_oc_preload(TIM1, TIM_OC3); timer_set_oc_slow_mode(TIM1, TIM_OC3); - timer_set_oc_mode(TIM1, TIM_OC3, TIM_CCMR2_OC3M_PWM1); + timer_set_oc_mode(TIM1, TIM_OC3, TIM_OCM_PWM1); /* Configure OC3. */ timer_set_oc_polarity_high(TIM1, TIM_OC3); -- cgit v1.2.3