MindPX: Use TIM14 CH1 for tone alarm output.

This commit is contained in:
Henry Zhang
2016-10-29 10:56:32 +02:00
committed by Lorenz Meier
parent b76c8cd80c
commit 53b4996379
2 changed files with 28 additions and 4 deletions
+25 -1
View File
@@ -198,8 +198,32 @@
# ifdef CONFIG_STM32_TIM11
# error Must not set CONFIG_STM32_TIM11 when TONE_ALARM_TIMER is 11
# endif
#elif TONE_ALARM_TIMER == 12
# define TONE_ALARM_BASE STM32_TIM12_BASE
# define TONE_ALARM_CLOCK STM32_APB1_TIM12_CLKIN
# define TONE_ALARM_CLOCK_POWER_REG STM32_RCC_APB1ENR
# define TONE_ALARM_CLOCK_ENABLE RCC_APB1ENR_TIM12EN
# ifdef CONFIG_STM32_TIM12
# error Must not set CONFIG_STM32_TIM12 when TONE_ALARM_TIMER is 12
# endif
#elif TONE_ALARM_TIMER == 13
# define TONE_ALARM_BASE STM32_TIM13_BASE
# define TONE_ALARM_CLOCK STM32_APB1_TIM12_CLKIN
# define TONE_ALARM_CLOCK_POWER_REG STM32_RCC_APB1ENR
# define TONE_ALARM_CLOCK_ENABLE RCC_APB1ENR_TIM13EN
# ifdef CONFIG_STM32_TIM13
# error Must not set CONFIG_STM32_TIM13 when TONE_ALARM_TIMER is 13
# endif
#elif TONE_ALARM_TIMER == 14
# define TONE_ALARM_BASE STM32_TIM14_BASE
# define TONE_ALARM_CLOCK STM32_APB1_TIM12_CLKIN
# define TONE_ALARM_CLOCK_POWER_REG STM32_RCC_APB1ENR
# define TONE_ALARM_CLOCK_ENABLE RCC_APB1ENR_TIM14EN
# ifdef CONFIG_STM32_TIM14
# error Must not set CONFIG_STM32_TIM14 when TONE_ALARM_TIMER is 14
# endif
#else
# error Must set TONE_ALARM_TIMER to one of the timers between 1 and 11 (inclusive) to use this driver.
# error Must set TONE_ALARM_TIMER to one of the timers between 1 and 14 (inclusive) to use this driver.
#endif
#if TONE_ALARM_CHANNEL == 1