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
|
/*
* Copyright (c) 2006-2023, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2022-07-13 Rbb666 first version
*/
#ifndef __PWM_CONFIG_H__
#define __PWM_CONFIG_H__
#include <rtthread.h>
#include <board.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define MAX_PERIOD 65535
#ifdef BSP_USING_PWM0
#ifndef PWM0_CH3_PORT13_CONFIG
#define PWM0_CH3_PORT13_CONFIG \
{ \
.name = "pwm0", \
.channel = 3, \
.gpio = GET_PIN(13, 7), \
}
#endif /* PWM0_CH7_PORT2_CONFIG */
#ifndef PWM0_CH7_PORT2_CONFIG
#define PWM0_CH7_PORT2_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(2, 2), \
}
#endif /* PWM0_CH7_PORT2_CONFIG */
#ifndef PWM0_CH7_PORT5_CONFIG
#define PWM0_CH7_PORT5_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(5, 6), \
}
#endif /* PWM0_CH7_PORT5_CONFIG */
#ifndef PWM0_CH7_PORT7_CONFIG
#define PWM0_CH7_PORT7_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(7, 7), \
}
#endif /* PWM0_CH7_PORT7_CONFIG */
#ifndef PWM0_CH7_PORT9_CONFIG
#define PWM0_CH7_PORT9_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(9, 4), \
}
#endif /* PWM0_CH7_PORT9_CONFIG */
#ifndef PWM0_CH7_PORT10_CONFIG
#define PWM0_CH7_PORT10_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(10, 2), \
}
#endif /* PWM0_CH7_PORT10_CONFIG */
#ifndef PWM0_CH7_PORT12_CONFIG
#define PWM0_CH7_PORT12_CONFIG \
{ \
.name = "pwm0", \
.channel = 7, \
.gpio = GET_PIN(12, 6), \
}
#endif /* PWM0_CH7_PORT12_CONFIG */
#endif /* BSP_USING_PWM0 */
#ifdef __cplusplus
}
#endif
#endif
|