summaryrefslogtreecommitdiff
path: root/bsp/stm32/libraries/HAL_Drivers/drivers/config/n6/tim_config.h
blob: f0402be37bfd52d60e12b12c0a48be9d586668c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * Copyright (c) 2006-2023, RT-Thread Development Team
 *
 * 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>

#ifdef __cplusplus
extern "C" {
#endif

#ifndef TIM_DEV_INFO_CONFIG
#define TIM_DEV_INFO_CONFIG                \
    {                                      \
        .maxfreq = 1000000,                \
        .minfreq = 3000,                   \
        .maxcnt = 0xFFFF,                  \
        .cntmode = CLOCK_TIMER_CNTMODE_UP, \
    }
#endif /* TIM_DEV_INFO_CONFIG */

#ifdef BSP_USING_TIM2
#ifndef TIM2_CONFIG
#define TIM2_CONFIG                  \
    {                                \
        .tim_handle.Instance = TIM2, \
        .tim_irqn = TIM2_IRQn,       \
        .name = "timer2",            \
    }
#endif /* TIM2_CONFIG */
#endif /* BSP_USING_TIM2 */

#ifdef __cplusplus
}
#endif

#endif /* __TIM_CONFIG_H__ */