1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-18 11:03:50 +01:00
RIOT/boards/common/stm32/include/cfg_timer_tim5.h
2025-07-18 14:23:37 +02:00

52 lines
860 B
C

/*
* SPDX-FileCopyrightText: 2019 Inria
* SPDX-License-Identifier: LGPL-2.1-only
*/
#pragma once
/**
* @ingroup boards_common_stm32
* @{
*
* @file
* @brief Common configuration for STM32 Timer peripheral based on TIM5
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*/
#include "periph_cpu.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Timer configuration
* @{
*/
static const timer_conf_t timer_config[] = {
{
.dev = TIM5,
.max = 0xffffffff,
#if defined(RCC_APB1ENR1_TIM5EN)
.rcc_mask = RCC_APB1ENR1_TIM5EN,
#else
.rcc_mask = RCC_APB1ENR_TIM5EN,
#endif
.bus = APB1,
.irqn = TIM5_IRQn
}
};
#define TIMER_0_ISR isr_tim5
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
/** @} */
#ifdef __cplusplus
}
#endif
/** @} */