1
0
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:
benpicco 2024-04-24 12:57:47 +00:00 committed by GitHub
commit 772bc7a876
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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,