mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #20617 from Enoch247/simplify-stm32-ifdefs
boards/common/stm32: simplify ifdef logic
This commit is contained in:
commit
772bc7a876
@ -37,10 +37,9 @@ static const timer_conf_t timer_config[] = {
|
||||
#else
|
||||
.max = 0xffffffff,
|
||||
#endif
|
||||
#if defined(CPU_FAM_STM32L4) || defined(CPU_FAM_STM32WB) || \
|
||||
defined(CPU_FAM_STM32WL) || defined(CPU_FAM_STM32G4)
|
||||
#if defined(RCC_APB1ENR1_TIM2EN)
|
||||
.rcc_mask = RCC_APB1ENR1_TIM2EN,
|
||||
#elif CPU_FAM_STM32MP1
|
||||
#elif defined(RCC_MC_APB1ENSETR_TIM2EN)
|
||||
.rcc_mask = RCC_MC_APB1ENSETR_TIM2EN,
|
||||
#else
|
||||
.rcc_mask = RCC_APB1ENR_TIM2EN,
|
||||
|
@ -33,8 +33,7 @@ static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.dev = TIM5,
|
||||
.max = 0xffffffff,
|
||||
#if defined(CPU_FAM_STM32G4) || defined(CPU_FAM_STM32L5) || \
|
||||
defined(CPU_FAM_STM32U5)
|
||||
#if defined(RCC_APB1ENR1_TIM5EN)
|
||||
.rcc_mask = RCC_APB1ENR1_TIM5EN,
|
||||
#else
|
||||
.rcc_mask = RCC_APB1ENR_TIM5EN,
|
||||
|
@ -37,8 +37,7 @@ static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.dev = TIM5,
|
||||
.max = 0xffffffff,
|
||||
#if defined(CPU_FAM_STM32G4) || defined(CPU_FAM_STM32L5) || \
|
||||
defined(CPU_FAM_STM32U5)
|
||||
#if defined(RCC_APB1ENR1_TIM5EN)
|
||||
.rcc_mask = RCC_APB1ENR1_TIM5EN,
|
||||
#else
|
||||
.rcc_mask = RCC_APB1ENR_TIM5EN,
|
||||
@ -53,10 +52,9 @@ static const timer_conf_t timer_config[] = {
|
||||
#else
|
||||
.max = 0xffffffff,
|
||||
#endif
|
||||
#if defined(CPU_FAM_STM32L4) || defined(CPU_FAM_STM32WB) || \
|
||||
defined(CPU_FAM_STM32WL) || defined(CPU_FAM_STM32G4)
|
||||
#if defined(RCC_APB1ENR1_TIM2EN)
|
||||
.rcc_mask = RCC_APB1ENR1_TIM2EN,
|
||||
#elif CPU_FAM_STM32MP1
|
||||
#elif defined(RCC_MC_APB1ENSETR_TIM2EN)
|
||||
.rcc_mask = RCC_MC_APB1ENSETR_TIM2EN,
|
||||
#else
|
||||
.rcc_mask = RCC_APB1ENR_TIM2EN,
|
||||
|
Loading…
Reference in New Issue
Block a user