2018-12-17 10:38:15 +08:00
|
|
|
/*
|
2021-03-08 22:40:39 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2018-12-17 10:38:15 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2018-12-11 zylx first version
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __TIM_CONFIG_H__
|
|
|
|
#define __TIM_CONFIG_H__
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
|
|
2019-01-09 10:10:39 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2018-12-17 10:38:15 +08:00
|
|
|
#ifndef TIM_DEV_INFO_CONFIG
|
|
|
|
#define TIM_DEV_INFO_CONFIG \
|
|
|
|
{ \
|
|
|
|
.maxfreq = 1000000, \
|
|
|
|
.minfreq = 3000, \
|
|
|
|
.maxcnt = 0xFFFF, \
|
|
|
|
.cntmode = HWTIMER_CNTMODE_UP, \
|
|
|
|
}
|
|
|
|
#endif /* TIM_DEV_INFO_CONFIG */
|
|
|
|
|
2020-01-15 21:05:12 +08:00
|
|
|
#ifdef BSP_USING_TIM3
|
|
|
|
#ifndef TIM3_CONFIG
|
|
|
|
#define TIM3_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM3, \
|
|
|
|
.tim_irqn = TIM3_IRQn, \
|
|
|
|
.name = "timer3", \
|
|
|
|
}
|
|
|
|
#endif /* TIM3_CONFIG */
|
|
|
|
#endif /* BSP_USING_TIM3 */
|
|
|
|
|
2018-12-17 10:38:15 +08:00
|
|
|
#ifdef BSP_USING_TIM11
|
|
|
|
#ifndef TIM11_CONFIG
|
|
|
|
#define TIM11_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM11, \
|
|
|
|
.tim_irqn = TIM1_TRG_COM_TIM11_IRQn, \
|
|
|
|
.name = "timer11", \
|
|
|
|
}
|
|
|
|
#endif /* TIM11_CONFIG */
|
|
|
|
#endif /* BSP_USING_TIM11 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_TIM13
|
|
|
|
#ifndef TIM13_CONFIG
|
|
|
|
#define TIM13_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM13, \
|
|
|
|
.tim_irqn = TIM8_UP_TIM13_IRQn, \
|
|
|
|
.name = "timer13", \
|
|
|
|
}
|
|
|
|
#endif /* TIM13_CONFIG */
|
|
|
|
#endif /* BSP_USING_TIM13 */
|
|
|
|
|
|
|
|
#ifdef BSP_USING_TIM14
|
|
|
|
#ifndef TIM14_CONFIG
|
|
|
|
#define TIM14_CONFIG \
|
|
|
|
{ \
|
|
|
|
.tim_handle.Instance = TIM14, \
|
|
|
|
.tim_irqn = TIM8_TRG_COM_TIM14_IRQn, \
|
|
|
|
.name = "timer14", \
|
|
|
|
}
|
|
|
|
#endif /* TIM14_CONFIG */
|
|
|
|
#endif /* BSP_USING_TIM14 */
|
|
|
|
|
2019-01-09 10:10:39 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-12-17 10:38:15 +08:00
|
|
|
#endif /* __TIM_CONFIG_H__ */
|