summaryrefslogtreecommitdiff
path: root/bsp/stm32/libraries/HAL_Drivers/config/l4/pwm_config.h
blob: 84c8cf8df8af2afca8e116dae77015cee7ab465b (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
 * Copyright (c) 2006-2023, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2018-12-13     zylx         first version
 */

#ifndef __PWM_CONFIG_H__
#define __PWM_CONFIG_H__

#include <rtthread.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef BSP_USING_PWM1
#define PWM1_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM1,         \
       .name                    = "pwm1",       \
       .channel                 = RT_NULL       \
    }
#endif /* BSP_USING_PWM1 */

#ifdef BSP_USING_PWM2
#define PWM2_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM2,         \
       .name                    = "pwm2",       \
       .channel                 = RT_NULL       \
    }
#endif /* BSP_USING_PWM2 */

#ifdef BSP_USING_PWM3
#define PWM3_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM3,         \
       .name                    = "pwm3",       \
       .channel                 = RT_NULL       \
    }
#endif /* BSP_USING_PWM3 */

#ifdef BSP_USING_PWM4
#define PWM4_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM4,         \
       .name                    = "pwm4",       \
       .channel                 = RT_NULL       \
    }
#endif /* BSP_USING_PWM4 */

#ifdef BSP_USING_PWM5
#define PWM5_CONFIG                             \
    {                                           \
       .tim_handle.Instance     = TIM5,         \
       .name                    = "pwm5",       \
       .channel                 = RT_NULL       \
    }
#endif /* BSP_USING_PWM5 */

#ifdef BSP_USING_PWM15
#define PWM15_CONFIG                            \
    {                                           \
       .tim_handle.Instance     = TIM15,        \
       .name                    = "pwm15",      \
       .channel                 = RT_NULL       \
    }
#endif /* BSP_USING_PWM15 */

#ifdef BSP_USING_PWM16
#define PWM16_CONFIG                            \
    {                                           \
       .tim_handle.Instance     = TIM16,        \
       .name                    = "pwm16",      \
       .channel                 = RT_NULL       \
    }
#endif /* BSP_USING_PWM16 */

#ifdef BSP_USING_PWM17
#define PWM17_CONFIG                            \
    {                                           \
       .tim_handle.Instance     = TIM17,        \
       .name                    = "pwm17",      \
       .channel                 = RT_NULL       \
    }
#endif /* BSP_USING_PWM17 */

#ifdef __cplusplus
}
#endif

#endif /* __PWM_CONFIG_H__ */