1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 23:41:18 +01:00

boards/stm32: introduce common timer config with TIM5

This commit is contained in:
Alexandre Abadie 2019-07-05 19:28:25 +02:00
parent 564686f882
commit 6b5a977f08
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -0,0 +1,52 @@
/*
* Copyright (C) 2019 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_common_stm32
* @{
*
* @file
* @brief Common configuration for STM32 Timer peripheral based on TIM5
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*/
#ifndef CFG_TIMER_TIM5_H
#define CFG_TIMER_TIM5_H
#include "periph_cpu.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Timer configuration
* @{
*/
static const timer_conf_t timer_config[] = {
{
.dev = TIM5,
.max = 0xffffffff,
.rcc_mask = RCC_APB1ENR_TIM5EN,
.bus = APB1,
.irqn = TIM5_IRQn
}
};
#define TIMER_0_ISR isr_tim5
#define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* CFG_TIMER_TIM5_H */
/** @} */