1// +build maixbit
2
3// Chip datasheet: https://s3.cn-north-1.amazonaws.com.cn/dl.kendryte.com/documents/kendryte_datasheet_20181011163248_en.pdf
4
5package machine
6
7// K210 IO pins.
8const (
9	P00 Pin = 0
10	P01 Pin = 1
11	P02 Pin = 2
12	P03 Pin = 3
13	P04 Pin = 4
14	P05 Pin = 5
15	P06 Pin = 6
16	P07 Pin = 7
17	P08 Pin = 8
18	P09 Pin = 9
19	P10 Pin = 10
20	P11 Pin = 11
21	P12 Pin = 12
22	P13 Pin = 13
23	P14 Pin = 14
24	P15 Pin = 15
25	P16 Pin = 16
26	P17 Pin = 17
27	P18 Pin = 18
28	P19 Pin = 19
29	P20 Pin = 20
30	P21 Pin = 21
31	P22 Pin = 22
32	P23 Pin = 23
33	P24 Pin = 24
34	P25 Pin = 25
35	P26 Pin = 26
36	P27 Pin = 27
37	P28 Pin = 28
38	P29 Pin = 29
39	P30 Pin = 30
40	P31 Pin = 31
41	P32 Pin = 32
42	P33 Pin = 33
43	P34 Pin = 34
44	P35 Pin = 35
45	P36 Pin = 36
46	P37 Pin = 37
47	P38 Pin = 38
48	P39 Pin = 39
49	P40 Pin = 40
50	P41 Pin = 41
51	P42 Pin = 42
52	P43 Pin = 43
53	P44 Pin = 44
54	P45 Pin = 45
55	P46 Pin = 46
56	P47 Pin = 47
57)
58
59type FPIOAFunction uint8
60
61// Every pin on the Kendryte K210 is assigned to an FPIOA function.
62// Each pin can be configured with every function below.
63const (
64	FUNC_JTAG_TCLK           FPIOAFunction = 0   // JTAG Test Clock
65	FUNC_JTAG_TDI            FPIOAFunction = 1   // JTAG Test Data In
66	FUNC_JTAG_TMS            FPIOAFunction = 2   // JTAG Test Mode Select
67	FUNC_JTAG_TDO            FPIOAFunction = 3   // JTAG Test Data Out
68	FUNC_SPI0_D0             FPIOAFunction = 4   // SPI0 Data 0
69	FUNC_SPI0_D1             FPIOAFunction = 5   // SPI0 Data 1
70	FUNC_SPI0_D2             FPIOAFunction = 6   // SPI0 Data 2
71	FUNC_SPI0_D3             FPIOAFunction = 7   // SPI0 Data 3
72	FUNC_SPI0_D4             FPIOAFunction = 8   // SPI0 Data 4
73	FUNC_SPI0_D5             FPIOAFunction = 9   // SPI0 Data 5
74	FUNC_SPI0_D6             FPIOAFunction = 10  // SPI0 Data 6
75	FUNC_SPI0_D7             FPIOAFunction = 11  // SPI0 Data 7
76	FUNC_SPI0_SS0            FPIOAFunction = 12  // SPI0 Chip Select 0
77	FUNC_SPI0_SS1            FPIOAFunction = 13  // SPI0 Chip Select 1
78	FUNC_SPI0_SS2            FPIOAFunction = 14  // SPI0 Chip Select 2
79	FUNC_SPI0_SS3            FPIOAFunction = 15  // SPI0 Chip Select 3
80	FUNC_SPI0_ARB            FPIOAFunction = 16  // SPI0 Arbitration
81	FUNC_SPI0_SCLK           FPIOAFunction = 17  // SPI0 Serial Clock
82	FUNC_UARTHS_RX           FPIOAFunction = 18  // UART High speed Receiver
83	FUNC_UARTHS_TX           FPIOAFunction = 19  // UART High speed Transmitter
84	FUNC_RESV6               FPIOAFunction = 20  // Reserved function
85	FUNC_RESV7               FPIOAFunction = 21  // Reserved function
86	FUNC_CLK_SPI1            FPIOAFunction = 22  // Clock SPI1
87	FUNC_CLK_I2C1            FPIOAFunction = 23  // Clock I2C1
88	FUNC_GPIOHS0             FPIOAFunction = 24  // GPIO High speed 0
89	FUNC_GPIOHS1             FPIOAFunction = 25  // GPIO High speed 1
90	FUNC_GPIOHS2             FPIOAFunction = 26  // GPIO High speed 2
91	FUNC_GPIOHS3             FPIOAFunction = 27  // GPIO High speed 3
92	FUNC_GPIOHS4             FPIOAFunction = 28  // GPIO High speed 4
93	FUNC_GPIOHS5             FPIOAFunction = 29  // GPIO High speed 5
94	FUNC_GPIOHS6             FPIOAFunction = 30  // GPIO High speed 6
95	FUNC_GPIOHS7             FPIOAFunction = 31  // GPIO High speed 7
96	FUNC_GPIOHS8             FPIOAFunction = 32  // GPIO High speed 8
97	FUNC_GPIOHS9             FPIOAFunction = 33  // GPIO High speed 9
98	FUNC_GPIOHS10            FPIOAFunction = 34  // GPIO High speed 10
99	FUNC_GPIOHS11            FPIOAFunction = 35  // GPIO High speed 11
100	FUNC_GPIOHS12            FPIOAFunction = 36  // GPIO High speed 12
101	FUNC_GPIOHS13            FPIOAFunction = 37  // GPIO High speed 13
102	FUNC_GPIOHS14            FPIOAFunction = 38  // GPIO High speed 14
103	FUNC_GPIOHS15            FPIOAFunction = 39  // GPIO High speed 15
104	FUNC_GPIOHS16            FPIOAFunction = 40  // GPIO High speed 16
105	FUNC_GPIOHS17            FPIOAFunction = 41  // GPIO High speed 17
106	FUNC_GPIOHS18            FPIOAFunction = 42  // GPIO High speed 18
107	FUNC_GPIOHS19            FPIOAFunction = 43  // GPIO High speed 19
108	FUNC_GPIOHS20            FPIOAFunction = 44  // GPIO High speed 20
109	FUNC_GPIOHS21            FPIOAFunction = 45  // GPIO High speed 21
110	FUNC_GPIOHS22            FPIOAFunction = 46  // GPIO High speed 22
111	FUNC_GPIOHS23            FPIOAFunction = 47  // GPIO High speed 23
112	FUNC_GPIOHS24            FPIOAFunction = 48  // GPIO High speed 24
113	FUNC_GPIOHS25            FPIOAFunction = 49  // GPIO High speed 25
114	FUNC_GPIOHS26            FPIOAFunction = 50  // GPIO High speed 26
115	FUNC_GPIOHS27            FPIOAFunction = 51  // GPIO High speed 27
116	FUNC_GPIOHS28            FPIOAFunction = 52  // GPIO High speed 28
117	FUNC_GPIOHS29            FPIOAFunction = 53  // GPIO High speed 29
118	FUNC_GPIOHS30            FPIOAFunction = 54  // GPIO High speed 30
119	FUNC_GPIOHS31            FPIOAFunction = 55  // GPIO High speed 31
120	FUNC_GPIO0               FPIOAFunction = 56  // GPIO pin 0
121	FUNC_GPIO1               FPIOAFunction = 57  // GPIO pin 1
122	FUNC_GPIO2               FPIOAFunction = 58  // GPIO pin 2
123	FUNC_GPIO3               FPIOAFunction = 59  // GPIO pin 3
124	FUNC_GPIO4               FPIOAFunction = 60  // GPIO pin 4
125	FUNC_GPIO5               FPIOAFunction = 61  // GPIO pin 5
126	FUNC_GPIO6               FPIOAFunction = 62  // GPIO pin 6
127	FUNC_GPIO7               FPIOAFunction = 63  // GPIO pin 7
128	FUNC_UART1_RX            FPIOAFunction = 64  // UART1 Receiver
129	FUNC_UART1_TX            FPIOAFunction = 65  // UART1 Transmitter
130	FUNC_UART2_RX            FPIOAFunction = 66  // UART2 Receiver
131	FUNC_UART2_TX            FPIOAFunction = 67  // UART2 Transmitter
132	FUNC_UART3_RX            FPIOAFunction = 68  // UART3 Receiver
133	FUNC_UART3_TX            FPIOAFunction = 69  // UART3 Transmitter
134	FUNC_SPI1_D0             FPIOAFunction = 70  // SPI1 Data 0
135	FUNC_SPI1_D1             FPIOAFunction = 71  // SPI1 Data 1
136	FUNC_SPI1_D2             FPIOAFunction = 72  // SPI1 Data 2
137	FUNC_SPI1_D3             FPIOAFunction = 73  // SPI1 Data 3
138	FUNC_SPI1_D4             FPIOAFunction = 74  // SPI1 Data 4
139	FUNC_SPI1_D5             FPIOAFunction = 75  // SPI1 Data 5
140	FUNC_SPI1_D6             FPIOAFunction = 76  // SPI1 Data 6
141	FUNC_SPI1_D7             FPIOAFunction = 77  // SPI1 Data 7
142	FUNC_SPI1_SS0            FPIOAFunction = 78  // SPI1 Chip Select 0
143	FUNC_SPI1_SS1            FPIOAFunction = 79  // SPI1 Chip Select 1
144	FUNC_SPI1_SS2            FPIOAFunction = 80  // SPI1 Chip Select 2
145	FUNC_SPI1_SS3            FPIOAFunction = 81  // SPI1 Chip Select 3
146	FUNC_SPI1_ARB            FPIOAFunction = 82  // SPI1 Arbitration
147	FUNC_SPI1_SCLK           FPIOAFunction = 83  // SPI1 Serial Clock
148	FUNC_SPI_PERIPHERAL_D0   FPIOAFunction = 84  // SPI Peripheral Data 0
149	FUNC_SPI_PERIPHERAL_SS   FPIOAFunction = 85  // SPI Peripheral Select
150	FUNC_SPI_PERIPHERAL_SCLK FPIOAFunction = 86  // SPI Peripheral Serial Clock
151	FUNC_I2S0_MCLK           FPIOAFunction = 87  // I2S0 Main Clock
152	FUNC_I2S0_SCLK           FPIOAFunction = 88  // I2S0 Serial Clock(BCLK)
153	FUNC_I2S0_WS             FPIOAFunction = 89  // I2S0 Word Select(LRCLK)
154	FUNC_I2S0_IN_D0          FPIOAFunction = 90  // I2S0 Serial Data Input 0
155	FUNC_I2S0_IN_D1          FPIOAFunction = 91  // I2S0 Serial Data Input 1
156	FUNC_I2S0_IN_D2          FPIOAFunction = 92  // I2S0 Serial Data Input 2
157	FUNC_I2S0_IN_D3          FPIOAFunction = 93  // I2S0 Serial Data Input 3
158	FUNC_I2S0_OUT_D0         FPIOAFunction = 94  // I2S0 Serial Data Output 0
159	FUNC_I2S0_OUT_D1         FPIOAFunction = 95  // I2S0 Serial Data Output 1
160	FUNC_I2S0_OUT_D2         FPIOAFunction = 96  // I2S0 Serial Data Output 2
161	FUNC_I2S0_OUT_D3         FPIOAFunction = 97  // I2S0 Serial Data Output 3
162	FUNC_I2S1_MCLK           FPIOAFunction = 98  // I2S1 Main Clock
163	FUNC_I2S1_SCLK           FPIOAFunction = 99  // I2S1 Serial Clock(BCLK)
164	FUNC_I2S1_WS             FPIOAFunction = 100 // I2S1 Word Select(LRCLK)
165	FUNC_I2S1_IN_D0          FPIOAFunction = 101 // I2S1 Serial Data Input 0
166	FUNC_I2S1_IN_D1          FPIOAFunction = 102 // I2S1 Serial Data Input 1
167	FUNC_I2S1_IN_D2          FPIOAFunction = 103 // I2S1 Serial Data Input 2
168	FUNC_I2S1_IN_D3          FPIOAFunction = 104 // I2S1 Serial Data Input 3
169	FUNC_I2S1_OUT_D0         FPIOAFunction = 105 // I2S1 Serial Data Output 0
170	FUNC_I2S1_OUT_D1         FPIOAFunction = 106 // I2S1 Serial Data Output 1
171	FUNC_I2S1_OUT_D2         FPIOAFunction = 107 // I2S1 Serial Data Output 2
172	FUNC_I2S1_OUT_D3         FPIOAFunction = 108 // I2S1 Serial Data Output 3
173	FUNC_I2S2_MCLK           FPIOAFunction = 109 // I2S2 Main Clock
174	FUNC_I2S2_SCLK           FPIOAFunction = 110 // I2S2 Serial Clock(BCLK)
175	FUNC_I2S2_WS             FPIOAFunction = 111 // I2S2 Word Select(LRCLK)
176	FUNC_I2S2_IN_D0          FPIOAFunction = 112 // I2S2 Serial Data Input 0
177	FUNC_I2S2_IN_D1          FPIOAFunction = 113 // I2S2 Serial Data Input 1
178	FUNC_I2S2_IN_D2          FPIOAFunction = 114 // I2S2 Serial Data Input 2
179	FUNC_I2S2_IN_D3          FPIOAFunction = 115 // I2S2 Serial Data Input 3
180	FUNC_I2S2_OUT_D0         FPIOAFunction = 116 // I2S2 Serial Data Output 0
181	FUNC_I2S2_OUT_D1         FPIOAFunction = 117 // I2S2 Serial Data Output 1
182	FUNC_I2S2_OUT_D2         FPIOAFunction = 118 // I2S2 Serial Data Output 2
183	FUNC_I2S2_OUT_D3         FPIOAFunction = 119 // I2S2 Serial Data Output 3
184	FUNC_RESV0               FPIOAFunction = 120 // Reserved function
185	FUNC_RESV1               FPIOAFunction = 121 // Reserved function
186	FUNC_RESV2               FPIOAFunction = 122 // Reserved function
187	FUNC_RESV3               FPIOAFunction = 123 // Reserved function
188	FUNC_RESV4               FPIOAFunction = 124 // Reserved function
189	FUNC_RESV5               FPIOAFunction = 125 // Reserved function
190	FUNC_I2C0_SCLK           FPIOAFunction = 126 // I2C0 Serial Clock
191	FUNC_I2C0_SDA            FPIOAFunction = 127 // I2C0 Serial Data
192	FUNC_I2C1_SCLK           FPIOAFunction = 128 // I2C1 Serial Clock
193	FUNC_I2C1_SDA            FPIOAFunction = 129 // I2C1 Serial Data
194	FUNC_I2C2_SCLK           FPIOAFunction = 130 // I2C2 Serial Clock
195	FUNC_I2C2_SDA            FPIOAFunction = 131 // I2C2 Serial Data
196	FUNC_CMOS_XCLK           FPIOAFunction = 132 // DVP System Clock
197	FUNC_CMOS_RST            FPIOAFunction = 133 // DVP System Reset
198	FUNC_CMOS_PWDN           FPIOAFunction = 134 // DVP Power Down Mode
199	FUNC_CMOS_VSYNC          FPIOAFunction = 135 // DVP Vertical Sync
200	FUNC_CMOS_HREF           FPIOAFunction = 136 // DVP Horizontal Reference output
201	FUNC_CMOS_PCLK           FPIOAFunction = 137 // Pixel Clock
202	FUNC_CMOS_D0             FPIOAFunction = 138 // Data Bit 0
203	FUNC_CMOS_D1             FPIOAFunction = 139 // Data Bit 1
204	FUNC_CMOS_D2             FPIOAFunction = 140 // Data Bit 2
205	FUNC_CMOS_D3             FPIOAFunction = 141 // Data Bit 3
206	FUNC_CMOS_D4             FPIOAFunction = 142 // Data Bit 4
207	FUNC_CMOS_D5             FPIOAFunction = 143 // Data Bit 5
208	FUNC_CMOS_D6             FPIOAFunction = 144 // Data Bit 6
209	FUNC_CMOS_D7             FPIOAFunction = 145 // Data Bit 7
210	FUNC_SCCB_SCLK           FPIOAFunction = 146 // SCCB Serial Clock
211	FUNC_SCCB_SDA            FPIOAFunction = 147 // SCCB Serial Data
212	FUNC_UART1_CTS           FPIOAFunction = 148 // UART1 Clear To Send
213	FUNC_UART1_DSR           FPIOAFunction = 149 // UART1 Data Set Ready
214	FUNC_UART1_DCD           FPIOAFunction = 150 // UART1 Data Carrier Detect
215	FUNC_UART1_RI            FPIOAFunction = 151 // UART1 Ring Indicator
216	FUNC_UART1_SIR_IN        FPIOAFunction = 152 // UART1 Serial Infrared Input
217	FUNC_UART1_DTR           FPIOAFunction = 153 // UART1 Data Terminal Ready
218	FUNC_UART1_RTS           FPIOAFunction = 154 // UART1 Request To Send
219	FUNC_UART1_OUT2          FPIOAFunction = 155 // UART1 User-designated Output 2
220	FUNC_UART1_OUT1          FPIOAFunction = 156 // UART1 User-designated Output 1
221	FUNC_UART1_SIR_OUT       FPIOAFunction = 157 // UART1 Serial Infrared Output
222	FUNC_UART1_BAUD          FPIOAFunction = 158 // UART1 Transmit Clock Output
223	FUNC_UART1_RE            FPIOAFunction = 159 // UART1 Receiver Output Enable
224	FUNC_UART1_DE            FPIOAFunction = 160 // UART1 Driver Output Enable
225	FUNC_UART1_RS485_EN      FPIOAFunction = 161 // UART1 RS485 Enable
226	FUNC_UART2_CTS           FPIOAFunction = 162 // UART2 Clear To Send
227	FUNC_UART2_DSR           FPIOAFunction = 163 // UART2 Data Set Ready
228	FUNC_UART2_DCD           FPIOAFunction = 164 // UART2 Data Carrier Detect
229	FUNC_UART2_RI            FPIOAFunction = 165 // UART2 Ring Indicator
230	FUNC_UART2_SIR_IN        FPIOAFunction = 166 // UART2 Serial Infrared Input
231	FUNC_UART2_DTR           FPIOAFunction = 167 // UART2 Data Terminal Ready
232	FUNC_UART2_RTS           FPIOAFunction = 168 // UART2 Request To Send
233	FUNC_UART2_OUT2          FPIOAFunction = 169 // UART2 User-designated Output 2
234	FUNC_UART2_OUT1          FPIOAFunction = 170 // UART2 User-designated Output 1
235	FUNC_UART2_SIR_OUT       FPIOAFunction = 171 // UART2 Serial Infrared Output
236	FUNC_UART2_BAUD          FPIOAFunction = 172 // UART2 Transmit Clock Output
237	FUNC_UART2_RE            FPIOAFunction = 173 // UART2 Receiver Output Enable
238	FUNC_UART2_DE            FPIOAFunction = 174 // UART2 Driver Output Enable
239	FUNC_UART2_RS485_EN      FPIOAFunction = 175 // UART2 RS485 Enable
240	FUNC_UART3_CTS           FPIOAFunction = 176 // UART3 Clear To Send
241	FUNC_UART3_DSR           FPIOAFunction = 177 // UART3 Data Set Ready
242	FUNC_UART3_DCD           FPIOAFunction = 178 // UART3 Data Carrier Detect
243	FUNC_UART3_RI            FPIOAFunction = 179 // UART3 Ring Indicator
244	FUNC_UART3_SIR_IN        FPIOAFunction = 180 // UART3 Serial Infrared Input
245	FUNC_UART3_DTR           FPIOAFunction = 181 // UART3 Data Terminal Ready
246	FUNC_UART3_RTS           FPIOAFunction = 182 // UART3 Request To Send
247	FUNC_UART3_OUT2          FPIOAFunction = 183 // UART3 User-designated Output 2
248	FUNC_UART3_OUT1          FPIOAFunction = 184 // UART3 User-designated Output 1
249	FUNC_UART3_SIR_OUT       FPIOAFunction = 185 // UART3 Serial Infrared Output
250	FUNC_UART3_BAUD          FPIOAFunction = 186 // UART3 Transmit Clock Output
251	FUNC_UART3_RE            FPIOAFunction = 187 // UART3 Receiver Output Enable
252	FUNC_UART3_DE            FPIOAFunction = 188 // UART3 Driver Output Enable
253	FUNC_UART3_RS485_EN      FPIOAFunction = 189 // UART3 RS485 Enable
254	FUNC_TIMER0_TOGGLE1      FPIOAFunction = 190 // TIMER0 Toggle Output 1
255	FUNC_TIMER0_TOGGLE2      FPIOAFunction = 191 // TIMER0 Toggle Output 2
256	FUNC_TIMER0_TOGGLE3      FPIOAFunction = 192 // TIMER0 Toggle Output 3
257	FUNC_TIMER0_TOGGLE4      FPIOAFunction = 193 // TIMER0 Toggle Output 4
258	FUNC_TIMER1_TOGGLE1      FPIOAFunction = 194 // TIMER1 Toggle Output 1
259	FUNC_TIMER1_TOGGLE2      FPIOAFunction = 195 // TIMER1 Toggle Output 2
260	FUNC_TIMER1_TOGGLE3      FPIOAFunction = 196 // TIMER1 Toggle Output 3
261	FUNC_TIMER1_TOGGLE4      FPIOAFunction = 197 // TIMER1 Toggle Output 4
262	FUNC_TIMER2_TOGGLE1      FPIOAFunction = 198 // TIMER2 Toggle Output 1
263	FUNC_TIMER2_TOGGLE2      FPIOAFunction = 199 // TIMER2 Toggle Output 2
264	FUNC_TIMER2_TOGGLE3      FPIOAFunction = 200 // TIMER2 Toggle Output 3
265	FUNC_TIMER2_TOGGLE4      FPIOAFunction = 201 // TIMER2 Toggle Output 4
266	FUNC_CLK_SPI2            FPIOAFunction = 202 // Clock SPI2
267	FUNC_CLK_I2C2            FPIOAFunction = 203 // Clock I2C2
268	FUNC_INTERNAL0           FPIOAFunction = 204 // Internal function signal 0
269	FUNC_INTERNAL1           FPIOAFunction = 205 // Internal function signal 1
270	FUNC_INTERNAL2           FPIOAFunction = 206 // Internal function signal 2
271	FUNC_INTERNAL3           FPIOAFunction = 207 // Internal function signal 3
272	FUNC_INTERNAL4           FPIOAFunction = 208 // Internal function signal 4
273	FUNC_INTERNAL5           FPIOAFunction = 209 // Internal function signal 5
274	FUNC_INTERNAL6           FPIOAFunction = 210 // Internal function signal 6
275	FUNC_INTERNAL7           FPIOAFunction = 211 // Internal function signal 7
276	FUNC_INTERNAL8           FPIOAFunction = 212 // Internal function signal 8
277	FUNC_INTERNAL9           FPIOAFunction = 213 // Internal function signal 9
278	FUNC_INTERNAL10          FPIOAFunction = 214 // Internal function signal 10
279	FUNC_INTERNAL11          FPIOAFunction = 215 // Internal function signal 11
280	FUNC_INTERNAL12          FPIOAFunction = 216 // Internal function signal 12
281	FUNC_INTERNAL13          FPIOAFunction = 217 // Internal function signal 13
282	FUNC_INTERNAL14          FPIOAFunction = 218 // Internal function signal 14
283	FUNC_INTERNAL15          FPIOAFunction = 219 // Internal function signal 15
284	FUNC_INTERNAL16          FPIOAFunction = 220 // Internal function signal 16
285	FUNC_INTERNAL17          FPIOAFunction = 221 // Internal function signal 17
286	FUNC_CONSTANT            FPIOAFunction = 222 // Constant function
287	FUNC_INTERNAL18          FPIOAFunction = 223 // Internal function signal 18
288	FUNC_DEBUG0              FPIOAFunction = 224 // Debug function 0
289	FUNC_DEBUG1              FPIOAFunction = 225 // Debug function 1
290	FUNC_DEBUG2              FPIOAFunction = 226 // Debug function 2
291	FUNC_DEBUG3              FPIOAFunction = 227 // Debug function 3
292	FUNC_DEBUG4              FPIOAFunction = 228 // Debug function 4
293	FUNC_DEBUG5              FPIOAFunction = 229 // Debug function 5
294	FUNC_DEBUG6              FPIOAFunction = 230 // Debug function 6
295	FUNC_DEBUG7              FPIOAFunction = 231 // Debug function 7
296	FUNC_DEBUG8              FPIOAFunction = 232 // Debug function 8
297	FUNC_DEBUG9              FPIOAFunction = 233 // Debug function 9
298	FUNC_DEBUG10             FPIOAFunction = 234 // Debug function 10
299	FUNC_DEBUG11             FPIOAFunction = 235 // Debug function 11
300	FUNC_DEBUG12             FPIOAFunction = 236 // Debug function 12
301	FUNC_DEBUG13             FPIOAFunction = 237 // Debug function 13
302	FUNC_DEBUG14             FPIOAFunction = 238 // Debug function 14
303	FUNC_DEBUG15             FPIOAFunction = 239 // Debug function 15
304	FUNC_DEBUG16             FPIOAFunction = 240 // Debug function 16
305	FUNC_DEBUG17             FPIOAFunction = 241 // Debug function 17
306	FUNC_DEBUG18             FPIOAFunction = 242 // Debug function 18
307	FUNC_DEBUG19             FPIOAFunction = 243 // Debug function 19
308	FUNC_DEBUG20             FPIOAFunction = 244 // Debug function 20
309	FUNC_DEBUG21             FPIOAFunction = 245 // Debug function 21
310	FUNC_DEBUG22             FPIOAFunction = 246 // Debug function 22
311	FUNC_DEBUG23             FPIOAFunction = 247 // Debug function 23
312	FUNC_DEBUG24             FPIOAFunction = 248 // Debug function 24
313	FUNC_DEBUG25             FPIOAFunction = 249 // Debug function 25
314	FUNC_DEBUG26             FPIOAFunction = 250 // Debug function 26
315	FUNC_DEBUG27             FPIOAFunction = 251 // Debug function 27
316	FUNC_DEBUG28             FPIOAFunction = 252 // Debug function 28
317	FUNC_DEBUG29             FPIOAFunction = 253 // Debug function 29
318	FUNC_DEBUG30             FPIOAFunction = 254 // Debug function 30
319	FUNC_DEBUG31             FPIOAFunction = 255 // Debug function 31
320)
321
322// These are the default FPIOA values for each function.
323// (source: https://github.com/kendryte/kendryte-standalone-sdk/blob/develop/lib/drivers/fpioa.c#L69)
324var fpioaFuncDefaults [256]uint32 = [256]uint32{
325	0x00900000, 0x00900001, 0x00900002, 0x00001f03, 0x00b03f04, 0x00b03f05, 0x00b03f06, 0x00b03f07, 0x00b03f08,
326	0x00b03f09, 0x00b03f0a, 0x00b03f0b, 0x00001f0c, 0x00001f0d, 0x00001f0e, 0x00001f0f, 0x03900010, 0x00001f11,
327	0x00900012, 0x00001f13, 0x00900014, 0x00900015, 0x00001f16, 0x00001f17, 0x00901f18, 0x00901f19, 0x00901f1a,
328	0x00901f1b, 0x00901f1c, 0x00901f1d, 0x00901f1e, 0x00901f1f, 0x00901f20, 0x00901f21, 0x00901f22, 0x00901f23,
329	0x00901f24, 0x00901f25, 0x00901f26, 0x00901f27, 0x00901f28, 0x00901f29, 0x00901f2a, 0x00901f2b, 0x00901f2c,
330	0x00901f2d, 0x00901f2e, 0x00901f2f, 0x00901f30, 0x00901f31, 0x00901f32, 0x00901f33, 0x00901f34, 0x00901f35,
331	0x00901f36, 0x00901f37, 0x00901f38, 0x00901f39, 0x00901f3a, 0x00901f3b, 0x00901f3c, 0x00901f3d, 0x00901f3e,
332	0x00901f3f, 0x00900040, 0x00001f41, 0x00900042, 0x00001f43, 0x00900044, 0x00001f45, 0x00b03f46, 0x00b03f47,
333	0x00b03f48, 0x00b03f49, 0x00b03f4a, 0x00b03f4b, 0x00b03f4c, 0x00b03f4d, 0x00001f4e, 0x00001f4f, 0x00001f50,
334	0x00001f51, 0x03900052, 0x00001f53, 0x00b03f54, 0x00900055, 0x00900056, 0x00001f57, 0x00001f58, 0x00001f59,
335	0x0090005a, 0x0090005b, 0x0090005c, 0x0090005d, 0x00001f5e, 0x00001f5f, 0x00001f60, 0x00001f61, 0x00001f62,
336	0x00001f63, 0x00001f64, 0x00900065, 0x00900066, 0x00900067, 0x00900068, 0x00001f69, 0x00001f6a, 0x00001f6b,
337	0x00001f6c, 0x00001f6d, 0x00001f6e, 0x00001f6f, 0x00900070, 0x00900071, 0x00900072, 0x00900073, 0x00001f74,
338	0x00001f75, 0x00001f76, 0x00001f77, 0x00000078, 0x00000079, 0x0000007a, 0x0000007b, 0x0000007c, 0x0000007d,
339	0x0099107e, 0x0099107f, 0x00991080, 0x00991081, 0x00991082, 0x00991083, 0x00001f84, 0x00001f85, 0x00001f86,
340	0x00900087, 0x00900088, 0x00900089, 0x0090008a, 0x0090008b, 0x0090008c, 0x0090008d, 0x0090008e, 0x0090008f,
341	0x00900090, 0x00900091, 0x00993092, 0x00993093, 0x00900094, 0x00900095, 0x00900096, 0x00900097, 0x00900098,
342	0x00001f99, 0x00001f9a, 0x00001f9b, 0x00001f9c, 0x00001f9d, 0x00001f9e, 0x00001f9f, 0x00001fa0, 0x00001fa1,
343	0x009000a2, 0x009000a3, 0x009000a4, 0x009000a5, 0x009000a6, 0x00001fa7, 0x00001fa8, 0x00001fa9, 0x00001faa,
344	0x00001fab, 0x00001fac, 0x00001fad, 0x00001fae, 0x00001faf, 0x009000b0, 0x009000b1, 0x009000b2, 0x009000b3,
345	0x009000b4, 0x00001fb5, 0x00001fb6, 0x00001fb7, 0x00001fb8, 0x00001fb9, 0x00001fba, 0x00001fbb, 0x00001fbc,
346	0x00001fbd, 0x00001fbe, 0x00001fbf, 0x00001fc0, 0x00001fc1, 0x00001fc2, 0x00001fc3, 0x00001fc4, 0x00001fc5,
347	0x00001fc6, 0x00001fc7, 0x00001fc8, 0x00001fc9, 0x00001fca, 0x00001fcb, 0x00001fcc, 0x00001fcd, 0x00001fce,
348	0x00001fcf, 0x00001fd0, 0x00001fd1, 0x00001fd2, 0x00001fd3, 0x00001fd4, 0x009000d5, 0x009000d6, 0x009000d7,
349	0x009000d8, 0x009100d9, 0x00991fda, 0x009000db, 0x009000dc, 0x009000dd, 0x000000de, 0x009000df, 0x00001fe0,
350	0x00001fe1, 0x00001fe2, 0x00001fe3, 0x00001fe4, 0x00001fe5, 0x00001fe6, 0x00001fe7, 0x00001fe8, 0x00001fe9,
351	0x00001fea, 0x00001feb, 0x00001fec, 0x00001fed, 0x00001fee, 0x00001fef, 0x00001ff0, 0x00001ff1, 0x00001ff2,
352	0x00001ff3, 0x00001ff4, 0x00001ff5, 0x00001ff6, 0x00001ff7, 0x00001ff8, 0x00001ff9, 0x00001ffa, 0x00001ffb,
353	0x00001ffc, 0x00001ffd, 0x00001ffe, 0x00001fff,
354}
355