Zephyr API Documentation
4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ch32v20x_30x-pinctrl.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2024 MASSDRIVER EI (massdriver.space)
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef __CH32V20X_V30X_PINCTRL_H__
8
#define __CH32V20X_V30X_PINCTRL_H__
9
10
#define CH32V20X_V30X_PINMUX_PORT_PA 0
11
#define CH32V20X_V30X_PINMUX_PORT_PB 1
12
#define CH32V20X_V30X_PINMUX_PORT_PC 2
13
#define CH32V20X_V30X_PINMUX_PORT_PD 3
14
#define CH32V20X_V30X_PINMUX_PORT_PE 4
15
16
/*
17
* Defines the starting bit for the remap field.
18
*/
19
#define CH32V20X_V30X_PINMUX_SPI1_RM 0
20
#define CH32V20X_V30X_PINMUX_I2C1_RM 1
21
#define CH32V20X_V30X_PINMUX_USART1_RM 2
22
#define CH32V20X_V30X_PINMUX_USART2_RM 3
23
#define CH32V20X_V30X_PINMUX_USART3_RM 4
24
#define CH32V20X_V30X_PINMUX_TIM1_RM 6
25
#define CH32V20X_V30X_PINMUX_TIM2_RM 8
26
#define CH32V20X_V30X_PINMUX_TIM3_RM 10
27
#define CH32V20X_V30X_PINMUX_TIM4_RM 12
28
#define CH32V20X_V30X_PINMUX_CAN1_RM 13
29
#define CH32V20X_V30X_PINMUX_PD01_RM 15
30
#define CH32V20X_V30X_PINMUX_TIM5CH4_RM 16
31
#define CH32V20X_V30X_PINMUX_ETH_RM 21
32
#define CH32V20X_V30X_PINMUX_CAN2_RM 22
33
#define CH32V20X_V30X_PINMUX_RMII_RM 23
34
#define CH32V20X_V30X_PINMUX_SDI_RM 24
36
#define CH32V20X_V30X_PINMUX_I2C2_RM 0
38
#define CH32V20X_V30X_PINMUX_SPI2_RM 0
39
#define CH32V20X_V30X_PINMUX_SPI3_RM 28
40
41
#define CH32V20X_V30X_PINMUX_TIM8_RM (32 + 2)
42
#define CH32V20X_V30X_PINMUX_TIM9_RM (32 + 3)
43
#define CH32V20X_V30X_PINMUX_TIM10_RM (32 + 5)
44
#define CH32V20X_V30X_PINMUX_USART4_RM (32 + 16)
45
#define CH32V20X_V30X_PINMUX_USART5_RM (32 + 18)
46
#define CH32V20X_V30X_PINMUX_USART6_RM (32 + 20)
47
#define CH32V20X_V30X_PINMUX_USART7_RM (32 + 22)
48
#define CH32V20X_V30X_PINMUX_USART8_RM (32 + 24)
49
#define CH32V20X_V30X_PINMUX_USART1_RM1 (32 + 26)
50
51
/* Port number with 0-4 */
52
#define CH32V20X_V30X_PINCTRL_PORT_SHIFT 0
53
#define CH32V20X_V30X_PINCTRL_PORT_MASK GENMASK(2, 0)
54
/* Pin number 0-15 */
55
#define CH32V20X_V30X_PINCTRL_PIN_SHIFT 3
56
#define CH32V20X_V30X_PINCTRL_PIN_MASK GENMASK(6, 3)
57
/* Base remap bit 0-31 */
58
#define CH32V20X_V30X_PINCTRL_RM_BASE_SHIFT 7
59
#define CH32V20X_V30X_PINCTRL_RM_BASE_MASK GENMASK(11, 7)
60
/* Remap Register ID */
61
#define CH32V20X_V30X_PINCTRL_PCFR_ID_SHIFT 12
62
#define CH32V20X_V30X_PINCTRL_PCFR_ID_MASK GENMASK(12, 12)
63
/* Function remapping ID 0-3 */
64
#define CH32V20X_V30X_PINCTRL_RM_SHIFT 13
65
#define CH32V20X_V30X_PINCTRL_RM_MASK GENMASK(14, 13)
66
67
#define CH32V20X_V30X_PINMUX_DEFINE(port, pin, rm, remapping) \
68
((CH32V20X_V30X_PINMUX_PORT_##port << CH32V20X_V30X_PINCTRL_PORT_SHIFT) | \
69
(pin << CH32V20X_V30X_PINCTRL_PIN_SHIFT) | \
70
(CH32V20X_V30X_PINMUX_##rm##_RM << CH32V20X_V30X_PINCTRL_RM_BASE_SHIFT) | \
71
(remapping << CH32V20X_V30X_PINCTRL_RM_SHIFT))
72
73
/* Pin swaps.
74
* Warning: Some of those do not apply to all packages.
75
* Verify using reference manual and use CH32V20X_V30X_PINMUX_DEFINE directly if needed.
76
*/
77
78
#define USART1_CK_PA8_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 8, USART1, 0)
79
#define USART1_CK_PA8_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 8, USART1, 1)
80
#define USART1_CK_PA10_2 CH32V20X_V30X_PINMUX_DEFINE(PA, 10, USART1, 2)
81
#define USART1_CK_PA5_3 CH32V20X_V30X_PINMUX_DEFINE(PA, 5, USART1, 3)
82
#define USART1_TX_PA9_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 9, USART1, 0)
83
#define USART1_TX_PB6_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 6, USART1, 1)
84
#define USART1_TX_PB15_2 CH32V20X_V30X_PINMUX_DEFINE(PB, 15, USART1, 2)
85
#define USART1_TX_PA6_3 CH32V20X_V30X_PINMUX_DEFINE(PA, 6, USART1, 3)
86
#define USART1_RX_PA10_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 10, USART1, 0)
87
#define USART1_RX_PB7_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 7, USART1, 1)
88
#define USART1_RX_PA8_2 CH32V20X_V30X_PINMUX_DEFINE(PA, 8, USART1, 2)
89
#define USART1_RX_PA7_3 CH32V20X_V30X_PINMUX_DEFINE(PA, 7, USART1, 3)
90
#define USART1_CTS_PA11_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 11, USART1, 0)
91
#define USART1_CTS_PA11_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 11, USART1, 1)
92
#define USART1_CTS_PA5_2 CH32V20X_V30X_PINMUX_DEFINE(PA, 5, USART1, 2)
93
#define USART1_CTS_PC4_3 CH32V20X_V30X_PINMUX_DEFINE(PC, 4, USART1, 3)
94
#define USART1_RTS_PA12_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 12, USART1, 0)
95
#define USART1_RTS_PA12_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 12, USART1, 1)
96
#define USART1_RTS_PA9_2 CH32V20X_V30X_PINMUX_DEFINE(PA, 9, USART1, 2)
97
#define USART1_RTS_PC5_3 CH32V20X_V30X_PINMUX_DEFINE(PC, 5, USART1, 3)
98
99
#define USART2_CK_PA4_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 4, USART2, 0)
100
#define USART2_CK_PD7_1 CH32V20X_V30X_PINMUX_DEFINE(PD, 7, USART2, 1)
101
#define USART2_TX_PA2_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 2, USART2, 0)
102
#define USART2_TX_PD5_1 CH32V20X_V30X_PINMUX_DEFINE(PD, 5, USART2, 1)
103
#define USART2_RX_PA3_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 3, USART2, 0)
104
#define USART2_RX_PD6_1 CH32V20X_V30X_PINMUX_DEFINE(PD, 6, USART2, 1)
105
#define USART2_CTS_PA0_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 0, USART2, 0)
106
#define USART2_CTS_PD3_1 CH32V20X_V30X_PINMUX_DEFINE(PD, 3, USART2, 1)
107
#define USART2_RTS_PA1_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 1, USART2, 0)
108
#define USART2_RTS_PD4_1 CH32V20X_V30X_PINMUX_DEFINE(PD, 4, USART2, 1)
109
110
#define USART3_CK_PB12_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 12, USART3, 0)
111
#define USART3_CK_PC12_1 CH32V20X_V30X_PINMUX_DEFINE(PC, 12, USART3, 1)
112
#define USART3_CK_PD10_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 10, USART3, 2)
113
#define USART3_CK_PD10_3 CH32V20X_V30X_PINMUX_DEFINE(PD, 10, USART3, 3)
114
#define USART3_TX_PB10_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 10, USART3, 0)
115
#define USART3_TX_PC10_1 CH32V20X_V30X_PINMUX_DEFINE(PC, 10, USART3, 1)
116
#define USART3_TX_PA13_2 CH32V20X_V30X_PINMUX_DEFINE(PA, 13, USART3, 2)
117
#define USART3_TX_PD8_3 CH32V20X_V30X_PINMUX_DEFINE(PD, 8, USART3, 3)
118
#define USART3_RX_PB11_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 11, USART3, 0)
119
#define USART3_RX_PC11_1 CH32V20X_V30X_PINMUX_DEFINE(PC, 11, USART3, 1)
120
#define USART3_RX_PA14_2 CH32V20X_V30X_PINMUX_DEFINE(PA, 14, USART3, 2)
121
#define USART3_RX_PD9_3 CH32V20X_V30X_PINMUX_DEFINE(PD, 9, USART3, 3)
122
#define USART3_CTS_PB13_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 13, USART3, 0)
123
#define USART3_CTS_PB13_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 13, USART3, 1)
124
#define USART3_CTS_PD11_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 11, USART3, 2)
125
#define USART3_CTS_PD11_3 CH32V20X_V30X_PINMUX_DEFINE(PD, 11, USART3, 3)
126
#define USART3_RTS_PB14_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 14, USART3, 0)
127
#define USART3_RTS_PB14_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 14, USART3, 1)
128
#define USART3_RTS_PD12_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 12, USART3, 2)
129
#define USART3_RTS_PD12_3 CH32V20X_V30X_PINMUX_DEFINE(PD, 12, USART3, 3)
130
131
#define USART4_CK_PB2_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 2, USART4, 0)
132
#define USART4_CK_PA6_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 6, USART4, 1)
133
#define USART4_TX_PB0_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 0, USART4, 0)
134
#define USART4_TX_PA5_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 5, USART4, 1)
135
#define USART4_RX_PB1_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 1, USART4, 0)
136
#define USART4_RX_PB5_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 5, USART4, 1)
137
#define USART4_CTS_PB3_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 3, USART4, 0)
138
#define USART4_CTS_PA7_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 7, USART4, 1)
139
#define USART4_RTS_PB4_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 4, USART4, 0)
140
#define USART4_RTS_PA15_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 15, USART4, 1)
141
142
#define USART5_TX_PC12_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 12, USART5, 0)
143
#define USART5_TX_PB4_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 4, USART5, 1)
144
#define USART5_TX_PE8_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 8, USART5, 2)
145
#define USART5_RX_PD2_0 CH32V20X_V30X_PINMUX_DEFINE(PD, 2, USART5, 0)
146
#define USART5_RX_PB5_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 5, USART5, 1)
147
#define USART5_RX_PE9_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 9, USART5, 2)
148
149
#define USART6_TX_PC0_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 0, USART6, 0)
150
#define USART6_TX_PB8_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 8, USART6, 1)
151
#define USART6_TX_PE10_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 10, USART6, 2)
152
#define USART6_RX_PC1_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 1, USART6, 0)
153
#define USART6_RX_PB9_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 9, USART6, 1)
154
#define USART6_RX_PE11_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 11, USART6, 2)
155
156
#define USART7_TX_PC2_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 2, USART7, 0)
157
#define USART7_TX_PA6_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 6, USART7, 1)
158
#define USART7_TX_PE12_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 12, USART7, 2)
159
#define USART7_RX_PC3_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 3, USART7, 0)
160
#define USART7_RX_PA7_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 7, USART7, 1)
161
#define USART7_RX_PE13_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 13, USART7, 2)
162
163
#define USART8_TX_PC4_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 4, USART8, 0)
164
#define USART8_TX_PA14_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 14, USART8, 1)
165
#define USART8_TX_PE14_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 14, USART8, 2)
166
#define USART8_RX_PC5_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 5, USART8, 0)
167
#define USART8_RX_PA15_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 15, USART8, 1)
168
#define USART8_RX_PE15_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 15, USART8, 2)
169
170
#define SPI1_NSS_PA4_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 4, SPI1, 0)
171
#define SPI1_NSS_PA15_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 15, SPI1, 1)
172
#define SPI1_SCK_PA5_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 5, SPI1, 0)
173
#define SPI1_SCK_PB3_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 3, SPI1, 1)
174
#define SPI1_MISO_PA6_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 6, SPI1, 0)
175
#define SPI1_MISO_PB4_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 4, SPI1, 1)
176
#define SPI1_MOSI_PA7_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 7, SPI1, 0)
177
#define SPI1_MOSI_PB5_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 5, SPI1, 1)
178
179
#define I2C1_SCL_PB6_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 6, I2C1, 0)
180
#define I2C1_SCL_PB8_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 8, I2C1, 1)
181
#define I2C1_SDA_PB7_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 7, I2C1, 0)
182
#define I2C1_SDA_PB9_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 9, I2C1, 1)
184
#define I2C2_SCL_PB10_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 10, I2C2, 0)
186
#define I2C2_SDA_PB11_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 11, I2C2, 0)
187
188
#define SPI2_NSS_PB12_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 12, SPI2, 0)
189
#define SPI2_SCK_PB13_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 13, SPI2, 0)
190
#define SPI2_MISO_PB14_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 14, SPI2, 0)
191
#define SPI2_MOSI_PB15_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 15, SPI2, 0)
192
193
#define SPI3_NSS_PA15_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 15, SPI3, 0)
194
#define SPI3_NSS_PA4_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 4, SPI3, 1)
195
#define SPI3_SCK_PB3_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 3, SPI3, 0)
196
#define SPI3_SCK_PC10_1 CH32V20X_V30X_PINMUX_DEFINE(PC, 10, SPI3, 1)
197
#define SPI3_MISO_PB4_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 4, SPI3, 0)
198
#define SPI3_MISO_PC11_1 CH32V20X_V30X_PINMUX_DEFINE(PC, 11, SPI3, 1)
199
#define SPI3_MOSI_PB5_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 5, SPI3, 0)
200
#define SPI3_MOSI_PC12_1 CH32V20X_V30X_PINMUX_DEFINE(PC, 12, SPI3, 1)
201
202
#define TIM1_ETR_PA12_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 12, TIM1, 0)
203
#define TIM1_ETR_PA12_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 12, TIM1, 1)
204
#define TIM1_ETR_PE7_3 CH32V20X_V30X_PINMUX_DEFINE(PE, 7, TIM1, 3)
205
#define TIM1_CH1_PA8_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 8, TIM1, 0)
206
#define TIM1_CH1_PA8_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 8, TIM1, 1)
207
#define TIM1_CH1_PE9_3 CH32V20X_V30X_PINMUX_DEFINE(PE, 9, TIM1, 3)
208
#define TIM1_CH2_PA9_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 9, TIM1, 0)
209
#define TIM1_CH2_PA9_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 9, TIM1, 1)
210
#define TIM1_CH2_PE11_3 CH32V20X_V30X_PINMUX_DEFINE(PE, 11, TIM1, 3)
211
#define TIM1_CH3_PA10_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 10, TIM1, 0)
212
#define TIM1_CH3_PA10_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 10, TIM1, 1)
213
#define TIM1_CH3_PE13_3 CH32V20X_V30X_PINMUX_DEFINE(PE, 13, TIM1, 3)
214
#define TIM1_CH4_PA11_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 11, TIM1, 0)
215
#define TIM1_CH4_PA11_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 11, TIM1, 1)
216
#define TIM1_CH4_PE14_3 CH32V20X_V30X_PINMUX_DEFINE(PE, 14, TIM1, 3)
217
#define TIM1_BKIN_PB12_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 12, TIM1, 0)
218
#define TIM1_BKIN_PA6_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 6, TIM1, 1)
219
#define TIM1_BKIN_PE15_3 CH32V20X_V30X_PINMUX_DEFINE(PE, 15, TIM1, 3)
220
#define TIM1_CH1N_PB13_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 13, TIM1, 0)
221
#define TIM1_CH1N_PA7_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 7, TIM1, 1)
222
#define TIM1_CH1N_PE8_3 CH32V20X_V30X_PINMUX_DEFINE(PE, 8, TIM1, 3)
223
#define TIM1_CH2N_PB14_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 14, TIM1, 0)
224
#define TIM1_CH2N_PB0_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 0, TIM1, 1)
225
#define TIM1_CH2N_PE10_3 CH32V20X_V30X_PINMUX_DEFINE(PE, 10, TIM1, 3)
226
#define TIM1_CH3N_PB15_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 15, TIM1, 0)
227
#define TIM1_CH3N_PB1_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 1, TIM1, 1)
228
#define TIM1_CH3N_PE12_3 CH32V20X_V30X_PINMUX_DEFINE(PE, 12, TIM1, 3)
229
230
#define TIM2_ETR_PA0_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 0, TIM2, 0)
231
#define TIM2_ETR_PA15_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 15, TIM2, 1)
232
#define TIM2_ETR_PA0_2 CH32V20X_V30X_PINMUX_DEFINE(PA, 0, TIM2, 2)
233
#define TIM2_ETR_PA15_3 CH32V20X_V30X_PINMUX_DEFINE(PA, 15, TIM2, 3)
234
#define TIM2_CH1_PA0_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 0, TIM2, 0)
235
#define TIM2_CH1_PA15_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 15, TIM2, 1)
236
#define TIM2_CH1_PA0_2 CH32V20X_V30X_PINMUX_DEFINE(PA, 0, TIM2, 2)
237
#define TIM2_CH1_PA15_3 CH32V20X_V30X_PINMUX_DEFINE(PA, 15, TIM2, 3)
238
#define TIM2_CH2_PA1_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 1, TIM2, 0)
239
#define TIM2_CH2_PB3_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 3, TIM2, 1)
240
#define TIM2_CH2_PA1_2 CH32V20X_V30X_PINMUX_DEFINE(PA, 1, TIM2, 2)
241
#define TIM2_CH2_PB3_3 CH32V20X_V30X_PINMUX_DEFINE(PB, 3, TIM2, 3)
242
#define TIM2_CH3_PA2_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 2, TIM2, 0)
243
#define TIM2_CH3_PA2_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 2, TIM2, 1)
244
#define TIM2_CH3_PB10_2 CH32V20X_V30X_PINMUX_DEFINE(PB, 10, TIM2, 2)
245
#define TIM2_CH3_PB10_3 CH32V20X_V30X_PINMUX_DEFINE(PB, 10, TIM2, 3)
246
#define TIM2_CH4_PA3_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 3, TIM2, 0)
247
#define TIM2_CH4_PA3_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 3, TIM2, 1)
248
#define TIM2_CH4_PB11_2 CH32V20X_V30X_PINMUX_DEFINE(PB, 11, TIM2, 2)
249
#define TIM2_CH4_PB11_3 CH32V20X_V30X_PINMUX_DEFINE(PB, 11, TIM2, 3)
250
251
#define TIM3_CH1_PA6_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 6, TIM3, 0)
252
#define TIM3_CH1_PB4_2 CH32V20X_V30X_PINMUX_DEFINE(PB, 4, TIM3, 2)
253
#define TIM3_CH1_PC6_3 CH32V20X_V30X_PINMUX_DEFINE(PC, 6, TIM3, 3)
254
#define TIM3_CH2_PA7_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 7, TIM3, 0)
255
#define TIM3_CH2_PB5_2 CH32V20X_V30X_PINMUX_DEFINE(PB, 5, TIM3, 2)
256
#define TIM3_CH2_PC7_3 CH32V20X_V30X_PINMUX_DEFINE(PC, 7, TIM3, 3)
257
#define TIM3_CH3_PB0_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 0, TIM3, 0)
258
#define TIM3_CH3_PB0_2 CH32V20X_V30X_PINMUX_DEFINE(PB, 0, TIM3, 2)
259
#define TIM3_CH3_PC8_3 CH32V20X_V30X_PINMUX_DEFINE(PC, 8, TIM3, 3)
260
#define TIM3_CH4_PB1_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 1, TIM3, 0)
261
#define TIM3_CH4_PB1_2 CH32V20X_V30X_PINMUX_DEFINE(PB, 1, TIM3, 2)
262
#define TIM3_CH4_PC9_3 CH32V20X_V30X_PINMUX_DEFINE(PC, 9, TIM3, 3)
263
264
#define TIM4_CH1_PB6_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 6, TIM4, 0)
265
#define TIM4_CH1_PD12_1 CH32V20X_V30X_PINMUX_DEFINE(PD, 12, TIM4, 1)
266
#define TIM4_CH2_PB7_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 7, TIM4, 0)
267
#define TIM4_CH2_PD13_1 CH32V20X_V30X_PINMUX_DEFINE(PD, 13, TIM4, 1)
268
#define TIM4_CH3_PB8_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 8, TIM4, 0)
269
#define TIM4_CH3_PD14_1 CH32V20X_V30X_PINMUX_DEFINE(PD, 14, TIM4, 1)
270
#define TIM4_CH4_PB9_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 9, TIM4, 0)
271
#define TIM4_CH4_PD15_1 CH32V20X_V30X_PINMUX_DEFINE(PD, 15, TIM4, 1)
272
273
#define TIM5_CH4_PA3_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 3, TIM5CH4, 0)
274
275
#define TIM8_ETR_PA0_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 0, TIM8, 0)
276
#define TIM8_ETR_PA0_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 0, TIM8, 1)
277
#define TIM8_CH1_PC6_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 6, TIM8, 0)
278
#define TIM8_CH1_PB6_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 6, TIM8, 1)
279
#define TIM8_CH2_PC7_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 7, TIM8, 0)
280
#define TIM8_CH2_PB7_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 7, TIM8, 1)
281
#define TIM8_CH3_PC8_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 8, TIM8, 0)
282
#define TIM8_CH3_PB8_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 8, TIM8, 1)
283
#define TIM8_CH4_PC9_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 9, TIM8, 0)
284
#define TIM8_CH4_PC13_1 CH32V20X_V30X_PINMUX_DEFINE(PC, 13, TIM8, 1)
285
#define TIM8_BKIN_PA6_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 6, TIM8, 0)
286
#define TIM8_BKIN_PB9_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 9, TIM8, 1)
287
#define TIM8_CH1N_PA7_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 7, TIM8, 0)
288
#define TIM8_CH1N_PA13_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 13, TIM8, 1)
289
#define TIM8_CH2N_PB0_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 0, TIM8, 0)
290
#define TIM8_CH2N_PA14_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 14, TIM8, 1)
291
#define TIM8_CH3N_PB1_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 1, TIM8, 0)
292
#define TIM8_CH3N_PA15_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 15, TIM8, 1)
293
294
#define TIM9_ETR_PA2_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 2, TIM9, 0)
295
#define TIM9_ETR_PA2_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 2, TIM9, 1)
296
#define TIM9_ETR_PD9_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 9, TIM9, 2)
297
#define TIM9_CH1_PA2_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 2, TIM9, 0)
298
#define TIM9_CH1_PA2_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 2, TIM9, 1)
299
#define TIM9_CH1_PD9_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 9, TIM9, 2)
300
#define TIM9_CH2_PA3_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 3, TIM9, 0)
301
#define TIM9_CH2_PA3_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 3, TIM9, 1)
302
#define TIM9_CH2_PD11_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 11, TIM9, 2)
303
#define TIM9_CH3_PA4_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 4, TIM9, 0)
304
#define TIM9_CH3_PA4_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 4, TIM9, 1)
305
#define TIM9_CH3_PD13_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 13, TIM9, 2)
306
#define TIM9_CH4_PC4_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 4, TIM9, 0)
307
#define TIM9_CH4_PC14_1 CH32V20X_V30X_PINMUX_DEFINE(PC, 14, TIM9, 1)
308
#define TIM9_CH4_PD15_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 15, TIM9, 2)
309
#define TIM9_BKIN_PC5_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 5, TIM9, 0)
310
#define TIM9_BKIN_PA1_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 1, TIM9, 1)
311
#define TIM9_BKIN_PD14_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 14, TIM9, 2)
312
#define TIM9_CH1N_PC0_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 0, TIM9, 0)
313
#define TIM9_CH1N_PB0_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 0, TIM9, 1)
314
#define TIM9_CH1N_PD8_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 8, TIM9, 2)
315
#define TIM9_CH2N_PC1_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 1, TIM9, 0)
316
#define TIM9_CH2N_PB1_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 1, TIM9, 1)
317
#define TIM9_CH2N_PD10_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 10, TIM9, 2)
318
#define TIM9_CH3N_PC2_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 2, TIM9, 0)
319
#define TIM9_CH3N_PB2_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 2, TIM9, 1)
320
#define TIM9_CH3N_PD12_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 12, TIM9, 2)
321
322
#define TIM10_ETR_PC10_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 10, TIM10, 0)
323
#define TIM10_ETR_PB11_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 11, TIM10, 1)
324
#define TIM10_ETR_PD0_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 0, TIM10, 2)
325
#define TIM10_CH1_PB8_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 8, TIM10, 0)
326
#define TIM10_CH1_PB3_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 3, TIM10, 1)
327
#define TIM10_CH1_PD1_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 1, TIM10, 2)
328
#define TIM10_CH2_PB9_0 CH32V20X_V30X_PINMUX_DEFINE(PB, 9, TIM10, 0)
329
#define TIM10_CH2_PB4_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 4, TIM10, 1)
330
#define TIM10_CH2_PD3_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 3, TIM10, 2)
331
#define TIM10_CH3_PC3_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 3, TIM10, 0)
332
#define TIM10_CH3_PB5_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 5, TIM10, 1)
333
#define TIM10_CH3_PD5_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 5, TIM10, 2)
334
#define TIM10_CH4_PC11_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 11, TIM10, 0)
335
#define TIM10_CH4_PC15_1 CH32V20X_V30X_PINMUX_DEFINE(PC, 15, TIM10, 1)
336
#define TIM10_CH4_PD7_2 CH32V20X_V30X_PINMUX_DEFINE(PD, 7, TIM10, 2)
337
#define TIM10_BKIN_PC12_0 CH32V20X_V30X_PINMUX_DEFINE(PC, 12, TIM10, 0)
338
#define TIM10_BKIN_PB10_1 CH32V20X_V30X_PINMUX_DEFINE(PB, 10, TIM10, 1)
339
#define TIM10_BKIN_PE2_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 2, TIM10, 2)
340
#define TIM10_CH1N_PA12_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 12, TIM10, 0)
341
#define TIM10_CH1N_PA5_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 5, TIM10, 1)
342
#define TIM10_CH1N_PE3_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 3, TIM10, 2)
343
#define TIM10_CH2N_PA13_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 13, TIM10, 0)
344
#define TIM10_CH2N_PA6_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 6, TIM10, 1)
345
#define TIM10_CH2N_PE4_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 4, TIM10, 2)
346
#define TIM10_CH3N_PA14_0 CH32V20X_V30X_PINMUX_DEFINE(PA, 14, TIM10, 0)
347
#define TIM10_CH3N_PA7_1 CH32V20X_V30X_PINMUX_DEFINE(PA, 7, TIM10, 1)
348
#define TIM10_CH3N_PE5_2 CH32V20X_V30X_PINMUX_DEFINE(PE, 5, TIM10, 2)
349
350
#endif
/* __CH32V20X_V30X_PINCTRL_H__ */
zephyr
dt-bindings
pinctrl
ch32v20x_30x-pinctrl.h
Generated on
for Zephyr API Documentation by
1.16.1