Merged in paulpatience/nuttx-arch/stm32_pwm (pull request #40)

STM32 PWM: Fix timer type bug
This commit is contained in:
Gregory Nutt 2015-12-18 18:47:41 -06:00
commit 727f0f47d6

View File

@ -84,20 +84,21 @@
#define TIMTYPE_ADVANCED 4 /* Advanced timers: TIM1-8 */
#define TIMTYPE_TIM1 TIMTYPE_ADVANCED
#ifdef CONFIG_STM32_STM32L15XX
#if defined(CONFIG_STM32_STM32L15XX) || defined(CONFIG_STM32_STM32F10XX)
# define TIMTYPE_TIM2 TIMTYPE_GENERAL16
# define TIMTYPE_TIM3 TIMTYPE_GENERAL16
# define TIMTYPE_TIM4 TIMTYPE_GENERAL16
# define TIMTYPE_TIM5 TIMTYPE_GENERAL32
#elif defined(CONFIG_STM32_STM32F10XX)
# define TIMTYPE_TIM2 TIMTYPE_GENERAL16
# define TIMTYPE_TIM3 TIMTYPE_GENERAL16
# define TIMTYPE_TIM4 TIMTYPE_GENERAL16
# define TIMTYPE_TIM5 TIMTYPE_GENERAL16
#else
# define TIMTYPE_TIM2 TIMTYPE_GENERAL32
#endif
#if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX)
# define TIMTYPE_TIM3 TIMTYPE_GENERAL32
# define TIMTYPE_TIM4 TIMTYPE_GENERAL32
#else
# define TIMTYPE_TIM3 TIMTYPE_GENERAL16
# define TIMTYPE_TIM4 TIMTYPE_GENERAL16
#endif
#if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32F30XX)
# define TIMTYPE_TIM5 TIMTYPE_GENERAL16
#else
# define TIMTYPE_TIM5 TIMTYPE_GENERAL32
#endif
#define TIMTYPE_TIM6 TIMTYPE_BASIC