1 /*
2  * Copyright (c) 2006-2023, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2018-12-11     zylx         first version
9  */
10 
11 #ifndef __TIM_CONFIG_H__
12 #define __TIM_CONFIG_H__
13 
14 #include <rtthread.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 #ifndef TIM_DEV_INFO_CONFIG
21 #define TIM_DEV_INFO_CONFIG                     \
22     {                                           \
23         .maxfreq = 1000000,                     \
24         .minfreq = 3000,                        \
25         .maxcnt  = 0xFFFF,                      \
26         .cntmode = HWTIMER_CNTMODE_UP,          \
27     }
28 #endif /* TIM_DEV_INFO_CONFIG */
29 
30 #ifdef BSP_USING_TIM1
31 #ifndef TIM1_CONFIG
32 #define TIM1_CONFIG                                         \
33     {                                                       \
34        .tim_handle.Instance     = TIM1,                     \
35        .tim_irqn                = TIM1_IRQn,                \
36        .name                    = "timer1",                 \
37     }
38 #endif /* TIM1_CONFIG */
39 #endif /* BSP_USING_TIM1 */
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 
45 #endif /* __TIM_CONFIG_H__ */
46