forked from Archive/PX4-Autopilot
PX4:stm32_common/ToneAlarmInterfacePWM.cpp Extend for STM32H7
This commit is contained in:
parent
11585dfb67
commit
37c1837ceb
|
@ -48,6 +48,24 @@
|
|||
#define TONE_ALARM_COUNTER_PERIOD 65536
|
||||
#endif
|
||||
|
||||
/* The H7 has a 2 RCC_APB1ENR registers RCC_APB1LENR and RCC_APB1HENR
|
||||
* We simply map the RCC_APB1LENR back to STM32_RCC_APB1ENR as well as
|
||||
* the bits
|
||||
*/
|
||||
|
||||
#if !defined(STM32_RCC_APB1ENR) && defined(STM32_RCC_APB1LENR)
|
||||
# define STM32_RCC_APB1ENR STM32_RCC_APB1LENR
|
||||
|
||||
# define RCC_APB1ENR_TIM2EN RCC_APB1LENR_TIM2EN
|
||||
# define RCC_APB1ENR_TIM3EN RCC_APB1LENR_TIM3EN
|
||||
# define RCC_APB1ENR_TIM4EN RCC_APB1LENR_TIM4EN
|
||||
# define RCC_APB1ENR_TIM5EN RCC_APB1LENR_TIM5EN
|
||||
# define RCC_APB1ENR_TIM6EN RCC_APB1LENR_TIM6EN
|
||||
# define RCC_APB1ENR_TIM7EN RCC_APB1LENR_TIM7EN
|
||||
# define RCC_APB1ENR_TIM12EN RCC_APB1LENR_TIM12EN
|
||||
# define RCC_APB1ENR_TIM13EN RCC_APB1LENR_TIM13EN
|
||||
# define RCC_APB1ENR_TIM14EN RCC_APB1LENR_TIM14EN
|
||||
#endif
|
||||
/* Tone alarm configuration */
|
||||
#if TONE_ALARM_TIMER == 1
|
||||
# define TONE_ALARM_BASE STM32_TIM1_BASE
|
||||
|
|
Loading…
Reference in New Issue