1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/common/stm32: simplify ifdef logic

This commit is contained in:
Joshua DeWeese 2024-04-23 16:31:01 -04:00
parent 3ae63a14ef
commit 3152301c3f
3 changed files with 6 additions and 10 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,