From eeea9c9cfbec9a6ed098b5a880966ac86b5c7b0d Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Wed, 16 Mar 2016 10:53:36 +0100 Subject: [PATCH] baords: fixed timer config for stm32f1 based boards --- boards/fox/include/periph_conf.h | 17 +++++++++++++---- boards/iotlab-m3/include/periph_conf.h | 17 +++++++++++++---- boards/nucleo-f103/include/periph_conf.h | 17 +++++++++++++---- boards/spark-core/include/periph_conf.h | 17 +++++++++++++---- 4 files changed, 52 insertions(+), 16 deletions(-) diff --git a/boards/fox/include/periph_conf.h b/boards/fox/include/periph_conf.h index a600942178..afc1d00024 100644 --- a/boards/fox/include/periph_conf.h +++ b/boards/fox/include/periph_conf.h @@ -51,13 +51,22 @@ extern "C" { /** @} */ /** - * @brief Timer configuration + * @brief Timer configuration * @{ */ static const timer_conf_t timer_config[] = { - /* device, APB bus, rcc_bit */ - { TIM2, APB1, RCC_APB1ENR_TIM2EN, TIM2_IRQn }, - { TIM3, APB1, RCC_APB1ENR_TIM3EN, TIM3_IRQn } + { + .dev = TIM2, + .rcc_bit = RCC_APB1ENR_TIM2EN, + .bus = APB1, + .irqn = TIM2_IRQn + }, + { + .dev = TIM3, + .rcc_bit = RCC_APB1ENR_TIM3EN, + .bus = APB1, + .irqn = TIM3_IRQn + } }; #define TIMER_0_ISR isr_tim2 diff --git a/boards/iotlab-m3/include/periph_conf.h b/boards/iotlab-m3/include/periph_conf.h index b3d2fd7f2f..5937254672 100644 --- a/boards/iotlab-m3/include/periph_conf.h +++ b/boards/iotlab-m3/include/periph_conf.h @@ -57,13 +57,22 @@ extern "C" { /** @} */ /** - * @brief Timer configuration + * @brief Timer configuration * @{ */ static const timer_conf_t timer_config[] = { - /* device, APB bus, rcc_bit */ - { TIM2, APB1, RCC_APB1ENR_TIM2EN, TIM2_IRQn }, - { TIM3, APB1, RCC_APB1ENR_TIM3EN, TIM3_IRQn } + { + .dev = TIM2, + .rcc_bit = RCC_APB1ENR_TIM2EN, + .bus = APB1, + .irqn = TIM2_IRQn + }, + { + .dev = TIM3, + .rcc_bit = RCC_APB1ENR_TIM3EN, + .bus = APB1, + .irqn = TIM3_IRQn + } }; #define TIMER_0_ISR isr_tim2 diff --git a/boards/nucleo-f103/include/periph_conf.h b/boards/nucleo-f103/include/periph_conf.h index e7285946f9..93514d2254 100644 --- a/boards/nucleo-f103/include/periph_conf.h +++ b/boards/nucleo-f103/include/periph_conf.h @@ -53,13 +53,22 @@ extern "C" { /** @} */ /** - * @brief Timer configuration + * @brief Timer configuration * @{ */ static const timer_conf_t timer_config[] = { - /* device, APB bus, rcc_bit */ - { TIM2, APB1, RCC_APB1ENR_TIM2EN, TIM2_IRQn }, - { TIM3, APB1, RCC_APB1ENR_TIM3EN, TIM3_IRQn } + { + .dev = TIM2, + .rcc_bit = RCC_APB1ENR_TIM2EN, + .bus = APB1, + .irqn = TIM2_IRQn + }, + { + .dev = TIM3, + .rcc_bit = RCC_APB1ENR_TIM3EN, + .bus = APB1, + .irqn = TIM3_IRQn + } }; #define TIMER_0_ISR isr_tim2 diff --git a/boards/spark-core/include/periph_conf.h b/boards/spark-core/include/periph_conf.h index 47cdffa9c0..4445b87cde 100644 --- a/boards/spark-core/include/periph_conf.h +++ b/boards/spark-core/include/periph_conf.h @@ -51,13 +51,22 @@ /** @} */ /** - * @brief Timer configuration + * @brief Timer configuration * @{ */ static const timer_conf_t timer_config[] = { - /* device, APB bus, rcc_bit */ - { TIM2, APB1, RCC_APB1ENR_TIM2EN, TIM2_IRQn }, - { TIM3, APB1, RCC_APB1ENR_TIM3EN, TIM3_IRQn } + { + .dev = TIM2, + .rcc_bit = RCC_APB1ENR_TIM2EN, + .bus = APB1, + .irqn = TIM2_IRQn + }, + { + .dev = TIM3, + .rcc_bit = RCC_APB1ENR_TIM3EN, + .bus = APB1, + .irqn = TIM3_IRQn + } }; #define TIMER_0_ISR isr_tim2