[FLYWOOF411] add board documentation
[inav/snaewe.git] / src / main / drivers / io_def_generated.h
bloba1f0fc31147e20e2ea0d1721cb234f5fc5a3c4c3
1 #pragma once
2 // this file is automatically generated by def_generated.pl script
3 // do not modify this file directly, your changes will be lost
5 // DEFIO_PORT_<port>_USED_MASK is bitmask of used pins on target
6 // DEFIO_PORT_<port>_USED_COUNT is count of used pins on target
8 #if defined(TARGET_IO_PORTA)
9 # define DEFIO_PORT_A_USED_MASK TARGET_IO_PORTA
10 # define DEFIO_PORT_A_USED_COUNT BITCOUNT(DEFIO_PORT_A_USED_MASK)
11 #else
12 # define DEFIO_PORT_A_USED_MASK 0
13 # define DEFIO_PORT_A_USED_COUNT 0
14 #endif
15 #define DEFIO_PORT_A_OFFSET (0)
17 #if defined(TARGET_IO_PORTB)
18 # define DEFIO_PORT_B_USED_MASK TARGET_IO_PORTB
19 # define DEFIO_PORT_B_USED_COUNT BITCOUNT(DEFIO_PORT_B_USED_MASK)
20 #else
21 # define DEFIO_PORT_B_USED_MASK 0
22 # define DEFIO_PORT_B_USED_COUNT 0
23 #endif
24 #define DEFIO_PORT_B_OFFSET (DEFIO_PORT_A_USED_COUNT)
26 #if defined(TARGET_IO_PORTC)
27 # define DEFIO_PORT_C_USED_MASK TARGET_IO_PORTC
28 # define DEFIO_PORT_C_USED_COUNT BITCOUNT(DEFIO_PORT_C_USED_MASK)
29 #else
30 # define DEFIO_PORT_C_USED_MASK 0
31 # define DEFIO_PORT_C_USED_COUNT 0
32 #endif
33 #define DEFIO_PORT_C_OFFSET (DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
35 #if defined(TARGET_IO_PORTD)
36 # define DEFIO_PORT_D_USED_MASK TARGET_IO_PORTD
37 # define DEFIO_PORT_D_USED_COUNT BITCOUNT(DEFIO_PORT_D_USED_MASK)
38 #else
39 # define DEFIO_PORT_D_USED_MASK 0
40 # define DEFIO_PORT_D_USED_COUNT 0
41 #endif
42 #define DEFIO_PORT_D_OFFSET (DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
44 #if defined(TARGET_IO_PORTE)
45 # define DEFIO_PORT_E_USED_MASK TARGET_IO_PORTE
46 # define DEFIO_PORT_E_USED_COUNT BITCOUNT(DEFIO_PORT_E_USED_MASK)
47 #else
48 # define DEFIO_PORT_E_USED_MASK 0
49 # define DEFIO_PORT_E_USED_COUNT 0
50 #endif
51 #define DEFIO_PORT_E_OFFSET (DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
53 #if defined(TARGET_IO_PORTF)
54 # define DEFIO_PORT_F_USED_MASK TARGET_IO_PORTF
55 # define DEFIO_PORT_F_USED_COUNT BITCOUNT(DEFIO_PORT_F_USED_MASK)
56 #else
57 # define DEFIO_PORT_F_USED_MASK 0
58 # define DEFIO_PORT_F_USED_COUNT 0
59 #endif
60 #define DEFIO_PORT_F_OFFSET (DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
62 #if defined(TARGET_IO_PORTG)
63 # define DEFIO_PORT_G_USED_MASK TARGET_IO_PORTG
64 # define DEFIO_PORT_G_USED_COUNT BITCOUNT(DEFIO_PORT_G_USED_MASK)
65 #else
66 # define DEFIO_PORT_G_USED_MASK 0
67 # define DEFIO_PORT_G_USED_COUNT 0
68 #endif
69 #define DEFIO_PORT_G_OFFSET (DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
73 // DEFIO_GPIOID__<port> maps to port index
74 #define DEFIO_GPIOID__A 0
75 #define DEFIO_GPIOID__B 1
76 #define DEFIO_GPIOID__C 2
77 #define DEFIO_GPIOID__D 3
78 #define DEFIO_GPIOID__E 4
79 #define DEFIO_GPIOID__F 5
80 #define DEFIO_GPIOID__G 6
82 // DEFIO_TAG__P<port><pin> will expand to TAG if defined for target
83 // DEFIO_REC__P<port><pin> will expand to ioRec* (using DEFIO_REC_INDEX(idx))
85 #if DEFIO_PORT_A_USED_MASK & BIT(0)
86 # define DEFIO_TAG__PA0 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 0)
87 # define DEFIO_TAG_E__PA0 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 0)
88 # define DEFIO_REC__PA0 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(0) - 1)) + 0)
89 #else
90 # define DEFIO_TAG__PA0 defio_error_PA0_is_not_supported_on_TARGET
91 # define DEFIO_TAG_E__PA0 DEFIO_TAG_E__NONE
92 # define DEFIO_REC__PA0 defio_error_PA0_is_not_supported_on_TARGET
93 #endif
94 #if DEFIO_PORT_A_USED_MASK & BIT(1)
95 # define DEFIO_TAG__PA1 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 1)
96 # define DEFIO_TAG_E__PA1 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 1)
97 # define DEFIO_REC__PA1 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(1) - 1)) + 0)
98 #else
99 # define DEFIO_TAG__PA1 defio_error_PA1_is_not_supported_on_TARGET
100 # define DEFIO_TAG_E__PA1 DEFIO_TAG_E__NONE
101 # define DEFIO_REC__PA1 defio_error_PA1_is_not_supported_on_TARGET
102 #endif
103 #if DEFIO_PORT_A_USED_MASK & BIT(2)
104 # define DEFIO_TAG__PA2 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 2)
105 # define DEFIO_TAG_E__PA2 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 2)
106 # define DEFIO_REC__PA2 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(2) - 1)) + 0)
107 #else
108 # define DEFIO_TAG__PA2 defio_error_PA2_is_not_supported_on_TARGET
109 # define DEFIO_TAG_E__PA2 DEFIO_TAG_E__NONE
110 # define DEFIO_REC__PA2 defio_error_PA2_is_not_supported_on_TARGET
111 #endif
112 #if DEFIO_PORT_A_USED_MASK & BIT(3)
113 # define DEFIO_TAG__PA3 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 3)
114 # define DEFIO_TAG_E__PA3 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 3)
115 # define DEFIO_REC__PA3 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(3) - 1)) + 0)
116 #else
117 # define DEFIO_TAG__PA3 defio_error_PA3_is_not_supported_on_TARGET
118 # define DEFIO_TAG_E__PA3 DEFIO_TAG_E__NONE
119 # define DEFIO_REC__PA3 defio_error_PA3_is_not_supported_on_TARGET
120 #endif
121 #if DEFIO_PORT_A_USED_MASK & BIT(4)
122 # define DEFIO_TAG__PA4 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 4)
123 # define DEFIO_TAG_E__PA4 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 4)
124 # define DEFIO_REC__PA4 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(4) - 1)) + 0)
125 #else
126 # define DEFIO_TAG__PA4 defio_error_PA4_is_not_supported_on_TARGET
127 # define DEFIO_TAG_E__PA4 DEFIO_TAG_E__NONE
128 # define DEFIO_REC__PA4 defio_error_PA4_is_not_supported_on_TARGET
129 #endif
130 #if DEFIO_PORT_A_USED_MASK & BIT(5)
131 # define DEFIO_TAG__PA5 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 5)
132 # define DEFIO_TAG_E__PA5 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 5)
133 # define DEFIO_REC__PA5 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(5) - 1)) + 0)
134 #else
135 # define DEFIO_TAG__PA5 defio_error_PA5_is_not_supported_on_TARGET
136 # define DEFIO_TAG_E__PA5 DEFIO_TAG_E__NONE
137 # define DEFIO_REC__PA5 defio_error_PA5_is_not_supported_on_TARGET
138 #endif
139 #if DEFIO_PORT_A_USED_MASK & BIT(6)
140 # define DEFIO_TAG__PA6 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 6)
141 # define DEFIO_TAG_E__PA6 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 6)
142 # define DEFIO_REC__PA6 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(6) - 1)) + 0)
143 #else
144 # define DEFIO_TAG__PA6 defio_error_PA6_is_not_supported_on_TARGET
145 # define DEFIO_TAG_E__PA6 DEFIO_TAG_E__NONE
146 # define DEFIO_REC__PA6 defio_error_PA6_is_not_supported_on_TARGET
147 #endif
148 #if DEFIO_PORT_A_USED_MASK & BIT(7)
149 # define DEFIO_TAG__PA7 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 7)
150 # define DEFIO_TAG_E__PA7 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 7)
151 # define DEFIO_REC__PA7 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(7) - 1)) + 0)
152 #else
153 # define DEFIO_TAG__PA7 defio_error_PA7_is_not_supported_on_TARGET
154 # define DEFIO_TAG_E__PA7 DEFIO_TAG_E__NONE
155 # define DEFIO_REC__PA7 defio_error_PA7_is_not_supported_on_TARGET
156 #endif
157 #if DEFIO_PORT_A_USED_MASK & BIT(8)
158 # define DEFIO_TAG__PA8 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 8)
159 # define DEFIO_TAG_E__PA8 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 8)
160 # define DEFIO_REC__PA8 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(8) - 1)) + 0)
161 #else
162 # define DEFIO_TAG__PA8 defio_error_PA8_is_not_supported_on_TARGET
163 # define DEFIO_TAG_E__PA8 DEFIO_TAG_E__NONE
164 # define DEFIO_REC__PA8 defio_error_PA8_is_not_supported_on_TARGET
165 #endif
166 #if DEFIO_PORT_A_USED_MASK & BIT(9)
167 # define DEFIO_TAG__PA9 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 9)
168 # define DEFIO_TAG_E__PA9 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 9)
169 # define DEFIO_REC__PA9 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(9) - 1)) + 0)
170 #else
171 # define DEFIO_TAG__PA9 defio_error_PA9_is_not_supported_on_TARGET
172 # define DEFIO_TAG_E__PA9 DEFIO_TAG_E__NONE
173 # define DEFIO_REC__PA9 defio_error_PA9_is_not_supported_on_TARGET
174 #endif
175 #if DEFIO_PORT_A_USED_MASK & BIT(10)
176 # define DEFIO_TAG__PA10 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 10)
177 # define DEFIO_TAG_E__PA10 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 10)
178 # define DEFIO_REC__PA10 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(10) - 1)) + 0)
179 #else
180 # define DEFIO_TAG__PA10 defio_error_PA10_is_not_supported_on_TARGET
181 # define DEFIO_TAG_E__PA10 DEFIO_TAG_E__NONE
182 # define DEFIO_REC__PA10 defio_error_PA10_is_not_supported_on_TARGET
183 #endif
184 #if DEFIO_PORT_A_USED_MASK & BIT(11)
185 # define DEFIO_TAG__PA11 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 11)
186 # define DEFIO_TAG_E__PA11 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 11)
187 # define DEFIO_REC__PA11 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(11) - 1)) + 0)
188 #else
189 # define DEFIO_TAG__PA11 defio_error_PA11_is_not_supported_on_TARGET
190 # define DEFIO_TAG_E__PA11 DEFIO_TAG_E__NONE
191 # define DEFIO_REC__PA11 defio_error_PA11_is_not_supported_on_TARGET
192 #endif
193 #if DEFIO_PORT_A_USED_MASK & BIT(12)
194 # define DEFIO_TAG__PA12 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 12)
195 # define DEFIO_TAG_E__PA12 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 12)
196 # define DEFIO_REC__PA12 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(12) - 1)) + 0)
197 #else
198 # define DEFIO_TAG__PA12 defio_error_PA12_is_not_supported_on_TARGET
199 # define DEFIO_TAG_E__PA12 DEFIO_TAG_E__NONE
200 # define DEFIO_REC__PA12 defio_error_PA12_is_not_supported_on_TARGET
201 #endif
202 #if DEFIO_PORT_A_USED_MASK & BIT(13)
203 # define DEFIO_TAG__PA13 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 13)
204 # define DEFIO_TAG_E__PA13 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 13)
205 # define DEFIO_REC__PA13 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(13) - 1)) + 0)
206 #else
207 # define DEFIO_TAG__PA13 defio_error_PA13_is_not_supported_on_TARGET
208 # define DEFIO_TAG_E__PA13 DEFIO_TAG_E__NONE
209 # define DEFIO_REC__PA13 defio_error_PA13_is_not_supported_on_TARGET
210 #endif
211 #if DEFIO_PORT_A_USED_MASK & BIT(14)
212 # define DEFIO_TAG__PA14 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 14)
213 # define DEFIO_TAG_E__PA14 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 14)
214 # define DEFIO_REC__PA14 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(14) - 1)) + 0)
215 #else
216 # define DEFIO_TAG__PA14 defio_error_PA14_is_not_supported_on_TARGET
217 # define DEFIO_TAG_E__PA14 DEFIO_TAG_E__NONE
218 # define DEFIO_REC__PA14 defio_error_PA14_is_not_supported_on_TARGET
219 #endif
220 #if DEFIO_PORT_A_USED_MASK & BIT(15)
221 # define DEFIO_TAG__PA15 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 15)
222 # define DEFIO_TAG_E__PA15 DEFIO_TAG_MAKE(DEFIO_GPIOID__A, 15)
223 # define DEFIO_REC__PA15 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_A_USED_MASK & (BIT(15) - 1)) + 0)
224 #else
225 # define DEFIO_TAG__PA15 defio_error_PA15_is_not_supported_on_TARGET
226 # define DEFIO_TAG_E__PA15 DEFIO_TAG_E__NONE
227 # define DEFIO_REC__PA15 defio_error_PA15_is_not_supported_on_TARGET
228 #endif
229 #if DEFIO_PORT_B_USED_MASK & BIT(0)
230 # define DEFIO_TAG__PB0 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 0)
231 # define DEFIO_TAG_E__PB0 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 0)
232 # define DEFIO_REC__PB0 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(0) - 1)) + DEFIO_PORT_A_USED_COUNT)
233 #else
234 # define DEFIO_TAG__PB0 defio_error_PB0_is_not_supported_on_TARGET
235 # define DEFIO_TAG_E__PB0 DEFIO_TAG_E__NONE
236 # define DEFIO_REC__PB0 defio_error_PB0_is_not_supported_on_TARGET
237 #endif
238 #if DEFIO_PORT_B_USED_MASK & BIT(1)
239 # define DEFIO_TAG__PB1 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 1)
240 # define DEFIO_TAG_E__PB1 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 1)
241 # define DEFIO_REC__PB1 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(1) - 1)) + DEFIO_PORT_A_USED_COUNT)
242 #else
243 # define DEFIO_TAG__PB1 defio_error_PB1_is_not_supported_on_TARGET
244 # define DEFIO_TAG_E__PB1 DEFIO_TAG_E__NONE
245 # define DEFIO_REC__PB1 defio_error_PB1_is_not_supported_on_TARGET
246 #endif
247 #if DEFIO_PORT_B_USED_MASK & BIT(2)
248 # define DEFIO_TAG__PB2 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 2)
249 # define DEFIO_TAG_E__PB2 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 2)
250 # define DEFIO_REC__PB2 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(2) - 1)) + DEFIO_PORT_A_USED_COUNT)
251 #else
252 # define DEFIO_TAG__PB2 defio_error_PB2_is_not_supported_on_TARGET
253 # define DEFIO_TAG_E__PB2 DEFIO_TAG_E__NONE
254 # define DEFIO_REC__PB2 defio_error_PB2_is_not_supported_on_TARGET
255 #endif
256 #if DEFIO_PORT_B_USED_MASK & BIT(3)
257 # define DEFIO_TAG__PB3 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 3)
258 # define DEFIO_TAG_E__PB3 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 3)
259 # define DEFIO_REC__PB3 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(3) - 1)) + DEFIO_PORT_A_USED_COUNT)
260 #else
261 # define DEFIO_TAG__PB3 defio_error_PB3_is_not_supported_on_TARGET
262 # define DEFIO_TAG_E__PB3 DEFIO_TAG_E__NONE
263 # define DEFIO_REC__PB3 defio_error_PB3_is_not_supported_on_TARGET
264 #endif
265 #if DEFIO_PORT_B_USED_MASK & BIT(4)
266 # define DEFIO_TAG__PB4 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 4)
267 # define DEFIO_TAG_E__PB4 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 4)
268 # define DEFIO_REC__PB4 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(4) - 1)) + DEFIO_PORT_A_USED_COUNT)
269 #else
270 # define DEFIO_TAG__PB4 defio_error_PB4_is_not_supported_on_TARGET
271 # define DEFIO_TAG_E__PB4 DEFIO_TAG_E__NONE
272 # define DEFIO_REC__PB4 defio_error_PB4_is_not_supported_on_TARGET
273 #endif
274 #if DEFIO_PORT_B_USED_MASK & BIT(5)
275 # define DEFIO_TAG__PB5 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 5)
276 # define DEFIO_TAG_E__PB5 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 5)
277 # define DEFIO_REC__PB5 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(5) - 1)) + DEFIO_PORT_A_USED_COUNT)
278 #else
279 # define DEFIO_TAG__PB5 defio_error_PB5_is_not_supported_on_TARGET
280 # define DEFIO_TAG_E__PB5 DEFIO_TAG_E__NONE
281 # define DEFIO_REC__PB5 defio_error_PB5_is_not_supported_on_TARGET
282 #endif
283 #if DEFIO_PORT_B_USED_MASK & BIT(6)
284 # define DEFIO_TAG__PB6 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 6)
285 # define DEFIO_TAG_E__PB6 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 6)
286 # define DEFIO_REC__PB6 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(6) - 1)) + DEFIO_PORT_A_USED_COUNT)
287 #else
288 # define DEFIO_TAG__PB6 defio_error_PB6_is_not_supported_on_TARGET
289 # define DEFIO_TAG_E__PB6 DEFIO_TAG_E__NONE
290 # define DEFIO_REC__PB6 defio_error_PB6_is_not_supported_on_TARGET
291 #endif
292 #if DEFIO_PORT_B_USED_MASK & BIT(7)
293 # define DEFIO_TAG__PB7 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 7)
294 # define DEFIO_TAG_E__PB7 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 7)
295 # define DEFIO_REC__PB7 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(7) - 1)) + DEFIO_PORT_A_USED_COUNT)
296 #else
297 # define DEFIO_TAG__PB7 defio_error_PB7_is_not_supported_on_TARGET
298 # define DEFIO_TAG_E__PB7 DEFIO_TAG_E__NONE
299 # define DEFIO_REC__PB7 defio_error_PB7_is_not_supported_on_TARGET
300 #endif
301 #if DEFIO_PORT_B_USED_MASK & BIT(8)
302 # define DEFIO_TAG__PB8 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 8)
303 # define DEFIO_TAG_E__PB8 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 8)
304 # define DEFIO_REC__PB8 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(8) - 1)) + DEFIO_PORT_A_USED_COUNT)
305 #else
306 # define DEFIO_TAG__PB8 defio_error_PB8_is_not_supported_on_TARGET
307 # define DEFIO_TAG_E__PB8 DEFIO_TAG_E__NONE
308 # define DEFIO_REC__PB8 defio_error_PB8_is_not_supported_on_TARGET
309 #endif
310 #if DEFIO_PORT_B_USED_MASK & BIT(9)
311 # define DEFIO_TAG__PB9 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 9)
312 # define DEFIO_TAG_E__PB9 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 9)
313 # define DEFIO_REC__PB9 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(9) - 1)) + DEFIO_PORT_A_USED_COUNT)
314 #else
315 # define DEFIO_TAG__PB9 defio_error_PB9_is_not_supported_on_TARGET
316 # define DEFIO_TAG_E__PB9 DEFIO_TAG_E__NONE
317 # define DEFIO_REC__PB9 defio_error_PB9_is_not_supported_on_TARGET
318 #endif
319 #if DEFIO_PORT_B_USED_MASK & BIT(10)
320 # define DEFIO_TAG__PB10 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 10)
321 # define DEFIO_TAG_E__PB10 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 10)
322 # define DEFIO_REC__PB10 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(10) - 1)) + DEFIO_PORT_A_USED_COUNT)
323 #else
324 # define DEFIO_TAG__PB10 defio_error_PB10_is_not_supported_on_TARGET
325 # define DEFIO_TAG_E__PB10 DEFIO_TAG_E__NONE
326 # define DEFIO_REC__PB10 defio_error_PB10_is_not_supported_on_TARGET
327 #endif
328 #if DEFIO_PORT_B_USED_MASK & BIT(11)
329 # define DEFIO_TAG__PB11 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 11)
330 # define DEFIO_TAG_E__PB11 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 11)
331 # define DEFIO_REC__PB11 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(11) - 1)) + DEFIO_PORT_A_USED_COUNT)
332 #else
333 # define DEFIO_TAG__PB11 defio_error_PB11_is_not_supported_on_TARGET
334 # define DEFIO_TAG_E__PB11 DEFIO_TAG_E__NONE
335 # define DEFIO_REC__PB11 defio_error_PB11_is_not_supported_on_TARGET
336 #endif
337 #if DEFIO_PORT_B_USED_MASK & BIT(12)
338 # define DEFIO_TAG__PB12 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 12)
339 # define DEFIO_TAG_E__PB12 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 12)
340 # define DEFIO_REC__PB12 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(12) - 1)) + DEFIO_PORT_A_USED_COUNT)
341 #else
342 # define DEFIO_TAG__PB12 defio_error_PB12_is_not_supported_on_TARGET
343 # define DEFIO_TAG_E__PB12 DEFIO_TAG_E__NONE
344 # define DEFIO_REC__PB12 defio_error_PB12_is_not_supported_on_TARGET
345 #endif
346 #if DEFIO_PORT_B_USED_MASK & BIT(13)
347 # define DEFIO_TAG__PB13 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 13)
348 # define DEFIO_TAG_E__PB13 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 13)
349 # define DEFIO_REC__PB13 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(13) - 1)) + DEFIO_PORT_A_USED_COUNT)
350 #else
351 # define DEFIO_TAG__PB13 defio_error_PB13_is_not_supported_on_TARGET
352 # define DEFIO_TAG_E__PB13 DEFIO_TAG_E__NONE
353 # define DEFIO_REC__PB13 defio_error_PB13_is_not_supported_on_TARGET
354 #endif
355 #if DEFIO_PORT_B_USED_MASK & BIT(14)
356 # define DEFIO_TAG__PB14 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 14)
357 # define DEFIO_TAG_E__PB14 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 14)
358 # define DEFIO_REC__PB14 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(14) - 1)) + DEFIO_PORT_A_USED_COUNT)
359 #else
360 # define DEFIO_TAG__PB14 defio_error_PB14_is_not_supported_on_TARGET
361 # define DEFIO_TAG_E__PB14 DEFIO_TAG_E__NONE
362 # define DEFIO_REC__PB14 defio_error_PB14_is_not_supported_on_TARGET
363 #endif
364 #if DEFIO_PORT_B_USED_MASK & BIT(15)
365 # define DEFIO_TAG__PB15 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 15)
366 # define DEFIO_TAG_E__PB15 DEFIO_TAG_MAKE(DEFIO_GPIOID__B, 15)
367 # define DEFIO_REC__PB15 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_B_USED_MASK & (BIT(15) - 1)) + DEFIO_PORT_A_USED_COUNT)
368 #else
369 # define DEFIO_TAG__PB15 defio_error_PB15_is_not_supported_on_TARGET
370 # define DEFIO_TAG_E__PB15 DEFIO_TAG_E__NONE
371 # define DEFIO_REC__PB15 defio_error_PB15_is_not_supported_on_TARGET
372 #endif
373 #if DEFIO_PORT_C_USED_MASK & BIT(0)
374 # define DEFIO_TAG__PC0 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 0)
375 # define DEFIO_TAG_E__PC0 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 0)
376 # define DEFIO_REC__PC0 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(0) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
377 #else
378 # define DEFIO_TAG__PC0 defio_error_PC0_is_not_supported_on_TARGET
379 # define DEFIO_TAG_E__PC0 DEFIO_TAG_E__NONE
380 # define DEFIO_REC__PC0 defio_error_PC0_is_not_supported_on_TARGET
381 #endif
382 #if DEFIO_PORT_C_USED_MASK & BIT(1)
383 # define DEFIO_TAG__PC1 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 1)
384 # define DEFIO_TAG_E__PC1 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 1)
385 # define DEFIO_REC__PC1 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(1) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
386 #else
387 # define DEFIO_TAG__PC1 defio_error_PC1_is_not_supported_on_TARGET
388 # define DEFIO_TAG_E__PC1 DEFIO_TAG_E__NONE
389 # define DEFIO_REC__PC1 defio_error_PC1_is_not_supported_on_TARGET
390 #endif
391 #if DEFIO_PORT_C_USED_MASK & BIT(2)
392 # define DEFIO_TAG__PC2 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 2)
393 # define DEFIO_TAG_E__PC2 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 2)
394 # define DEFIO_REC__PC2 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(2) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
395 #else
396 # define DEFIO_TAG__PC2 defio_error_PC2_is_not_supported_on_TARGET
397 # define DEFIO_TAG_E__PC2 DEFIO_TAG_E__NONE
398 # define DEFIO_REC__PC2 defio_error_PC2_is_not_supported_on_TARGET
399 #endif
400 #if DEFIO_PORT_C_USED_MASK & BIT(3)
401 # define DEFIO_TAG__PC3 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 3)
402 # define DEFIO_TAG_E__PC3 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 3)
403 # define DEFIO_REC__PC3 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(3) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
404 #else
405 # define DEFIO_TAG__PC3 defio_error_PC3_is_not_supported_on_TARGET
406 # define DEFIO_TAG_E__PC3 DEFIO_TAG_E__NONE
407 # define DEFIO_REC__PC3 defio_error_PC3_is_not_supported_on_TARGET
408 #endif
409 #if DEFIO_PORT_C_USED_MASK & BIT(4)
410 # define DEFIO_TAG__PC4 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 4)
411 # define DEFIO_TAG_E__PC4 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 4)
412 # define DEFIO_REC__PC4 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(4) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
413 #else
414 # define DEFIO_TAG__PC4 defio_error_PC4_is_not_supported_on_TARGET
415 # define DEFIO_TAG_E__PC4 DEFIO_TAG_E__NONE
416 # define DEFIO_REC__PC4 defio_error_PC4_is_not_supported_on_TARGET
417 #endif
418 #if DEFIO_PORT_C_USED_MASK & BIT(5)
419 # define DEFIO_TAG__PC5 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 5)
420 # define DEFIO_TAG_E__PC5 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 5)
421 # define DEFIO_REC__PC5 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(5) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
422 #else
423 # define DEFIO_TAG__PC5 defio_error_PC5_is_not_supported_on_TARGET
424 # define DEFIO_TAG_E__PC5 DEFIO_TAG_E__NONE
425 # define DEFIO_REC__PC5 defio_error_PC5_is_not_supported_on_TARGET
426 #endif
427 #if DEFIO_PORT_C_USED_MASK & BIT(6)
428 # define DEFIO_TAG__PC6 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 6)
429 # define DEFIO_TAG_E__PC6 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 6)
430 # define DEFIO_REC__PC6 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(6) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
431 #else
432 # define DEFIO_TAG__PC6 defio_error_PC6_is_not_supported_on_TARGET
433 # define DEFIO_TAG_E__PC6 DEFIO_TAG_E__NONE
434 # define DEFIO_REC__PC6 defio_error_PC6_is_not_supported_on_TARGET
435 #endif
436 #if DEFIO_PORT_C_USED_MASK & BIT(7)
437 # define DEFIO_TAG__PC7 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 7)
438 # define DEFIO_TAG_E__PC7 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 7)
439 # define DEFIO_REC__PC7 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(7) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
440 #else
441 # define DEFIO_TAG__PC7 defio_error_PC7_is_not_supported_on_TARGET
442 # define DEFIO_TAG_E__PC7 DEFIO_TAG_E__NONE
443 # define DEFIO_REC__PC7 defio_error_PC7_is_not_supported_on_TARGET
444 #endif
445 #if DEFIO_PORT_C_USED_MASK & BIT(8)
446 # define DEFIO_TAG__PC8 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 8)
447 # define DEFIO_TAG_E__PC8 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 8)
448 # define DEFIO_REC__PC8 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(8) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
449 #else
450 # define DEFIO_TAG__PC8 defio_error_PC8_is_not_supported_on_TARGET
451 # define DEFIO_TAG_E__PC8 DEFIO_TAG_E__NONE
452 # define DEFIO_REC__PC8 defio_error_PC8_is_not_supported_on_TARGET
453 #endif
454 #if DEFIO_PORT_C_USED_MASK & BIT(9)
455 # define DEFIO_TAG__PC9 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 9)
456 # define DEFIO_TAG_E__PC9 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 9)
457 # define DEFIO_REC__PC9 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(9) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
458 #else
459 # define DEFIO_TAG__PC9 defio_error_PC9_is_not_supported_on_TARGET
460 # define DEFIO_TAG_E__PC9 DEFIO_TAG_E__NONE
461 # define DEFIO_REC__PC9 defio_error_PC9_is_not_supported_on_TARGET
462 #endif
463 #if DEFIO_PORT_C_USED_MASK & BIT(10)
464 # define DEFIO_TAG__PC10 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 10)
465 # define DEFIO_TAG_E__PC10 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 10)
466 # define DEFIO_REC__PC10 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(10) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
467 #else
468 # define DEFIO_TAG__PC10 defio_error_PC10_is_not_supported_on_TARGET
469 # define DEFIO_TAG_E__PC10 DEFIO_TAG_E__NONE
470 # define DEFIO_REC__PC10 defio_error_PC10_is_not_supported_on_TARGET
471 #endif
472 #if DEFIO_PORT_C_USED_MASK & BIT(11)
473 # define DEFIO_TAG__PC11 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 11)
474 # define DEFIO_TAG_E__PC11 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 11)
475 # define DEFIO_REC__PC11 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(11) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
476 #else
477 # define DEFIO_TAG__PC11 defio_error_PC11_is_not_supported_on_TARGET
478 # define DEFIO_TAG_E__PC11 DEFIO_TAG_E__NONE
479 # define DEFIO_REC__PC11 defio_error_PC11_is_not_supported_on_TARGET
480 #endif
481 #if DEFIO_PORT_C_USED_MASK & BIT(12)
482 # define DEFIO_TAG__PC12 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 12)
483 # define DEFIO_TAG_E__PC12 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 12)
484 # define DEFIO_REC__PC12 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(12) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
485 #else
486 # define DEFIO_TAG__PC12 defio_error_PC12_is_not_supported_on_TARGET
487 # define DEFIO_TAG_E__PC12 DEFIO_TAG_E__NONE
488 # define DEFIO_REC__PC12 defio_error_PC12_is_not_supported_on_TARGET
489 #endif
490 #if DEFIO_PORT_C_USED_MASK & BIT(13)
491 # define DEFIO_TAG__PC13 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 13)
492 # define DEFIO_TAG_E__PC13 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 13)
493 # define DEFIO_REC__PC13 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(13) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
494 #else
495 # define DEFIO_TAG__PC13 defio_error_PC13_is_not_supported_on_TARGET
496 # define DEFIO_TAG_E__PC13 DEFIO_TAG_E__NONE
497 # define DEFIO_REC__PC13 defio_error_PC13_is_not_supported_on_TARGET
498 #endif
499 #if DEFIO_PORT_C_USED_MASK & BIT(14)
500 # define DEFIO_TAG__PC14 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 14)
501 # define DEFIO_TAG_E__PC14 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 14)
502 # define DEFIO_REC__PC14 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(14) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
503 #else
504 # define DEFIO_TAG__PC14 defio_error_PC14_is_not_supported_on_TARGET
505 # define DEFIO_TAG_E__PC14 DEFIO_TAG_E__NONE
506 # define DEFIO_REC__PC14 defio_error_PC14_is_not_supported_on_TARGET
507 #endif
508 #if DEFIO_PORT_C_USED_MASK & BIT(15)
509 # define DEFIO_TAG__PC15 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 15)
510 # define DEFIO_TAG_E__PC15 DEFIO_TAG_MAKE(DEFIO_GPIOID__C, 15)
511 # define DEFIO_REC__PC15 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_C_USED_MASK & (BIT(15) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT)
512 #else
513 # define DEFIO_TAG__PC15 defio_error_PC15_is_not_supported_on_TARGET
514 # define DEFIO_TAG_E__PC15 DEFIO_TAG_E__NONE
515 # define DEFIO_REC__PC15 defio_error_PC15_is_not_supported_on_TARGET
516 #endif
517 #if DEFIO_PORT_D_USED_MASK & BIT(0)
518 # define DEFIO_TAG__PD0 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 0)
519 # define DEFIO_TAG_E__PD0 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 0)
520 # define DEFIO_REC__PD0 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(0) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
521 #else
522 # define DEFIO_TAG__PD0 defio_error_PD0_is_not_supported_on_TARGET
523 # define DEFIO_TAG_E__PD0 DEFIO_TAG_E__NONE
524 # define DEFIO_REC__PD0 defio_error_PD0_is_not_supported_on_TARGET
525 #endif
526 #if DEFIO_PORT_D_USED_MASK & BIT(1)
527 # define DEFIO_TAG__PD1 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 1)
528 # define DEFIO_TAG_E__PD1 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 1)
529 # define DEFIO_REC__PD1 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(1) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
530 #else
531 # define DEFIO_TAG__PD1 defio_error_PD1_is_not_supported_on_TARGET
532 # define DEFIO_TAG_E__PD1 DEFIO_TAG_E__NONE
533 # define DEFIO_REC__PD1 defio_error_PD1_is_not_supported_on_TARGET
534 #endif
535 #if DEFIO_PORT_D_USED_MASK & BIT(2)
536 # define DEFIO_TAG__PD2 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 2)
537 # define DEFIO_TAG_E__PD2 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 2)
538 # define DEFIO_REC__PD2 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(2) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
539 #else
540 # define DEFIO_TAG__PD2 defio_error_PD2_is_not_supported_on_TARGET
541 # define DEFIO_TAG_E__PD2 DEFIO_TAG_E__NONE
542 # define DEFIO_REC__PD2 defio_error_PD2_is_not_supported_on_TARGET
543 #endif
544 #if DEFIO_PORT_D_USED_MASK & BIT(3)
545 # define DEFIO_TAG__PD3 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 3)
546 # define DEFIO_TAG_E__PD3 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 3)
547 # define DEFIO_REC__PD3 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(3) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
548 #else
549 # define DEFIO_TAG__PD3 defio_error_PD3_is_not_supported_on_TARGET
550 # define DEFIO_TAG_E__PD3 DEFIO_TAG_E__NONE
551 # define DEFIO_REC__PD3 defio_error_PD3_is_not_supported_on_TARGET
552 #endif
553 #if DEFIO_PORT_D_USED_MASK & BIT(4)
554 # define DEFIO_TAG__PD4 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 4)
555 # define DEFIO_TAG_E__PD4 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 4)
556 # define DEFIO_REC__PD4 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(4) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
557 #else
558 # define DEFIO_TAG__PD4 defio_error_PD4_is_not_supported_on_TARGET
559 # define DEFIO_TAG_E__PD4 DEFIO_TAG_E__NONE
560 # define DEFIO_REC__PD4 defio_error_PD4_is_not_supported_on_TARGET
561 #endif
562 #if DEFIO_PORT_D_USED_MASK & BIT(5)
563 # define DEFIO_TAG__PD5 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 5)
564 # define DEFIO_TAG_E__PD5 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 5)
565 # define DEFIO_REC__PD5 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(5) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
566 #else
567 # define DEFIO_TAG__PD5 defio_error_PD5_is_not_supported_on_TARGET
568 # define DEFIO_TAG_E__PD5 DEFIO_TAG_E__NONE
569 # define DEFIO_REC__PD5 defio_error_PD5_is_not_supported_on_TARGET
570 #endif
571 #if DEFIO_PORT_D_USED_MASK & BIT(6)
572 # define DEFIO_TAG__PD6 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 6)
573 # define DEFIO_TAG_E__PD6 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 6)
574 # define DEFIO_REC__PD6 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(6) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
575 #else
576 # define DEFIO_TAG__PD6 defio_error_PD6_is_not_supported_on_TARGET
577 # define DEFIO_TAG_E__PD6 DEFIO_TAG_E__NONE
578 # define DEFIO_REC__PD6 defio_error_PD6_is_not_supported_on_TARGET
579 #endif
580 #if DEFIO_PORT_D_USED_MASK & BIT(7)
581 # define DEFIO_TAG__PD7 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 7)
582 # define DEFIO_TAG_E__PD7 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 7)
583 # define DEFIO_REC__PD7 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(7) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
584 #else
585 # define DEFIO_TAG__PD7 defio_error_PD7_is_not_supported_on_TARGET
586 # define DEFIO_TAG_E__PD7 DEFIO_TAG_E__NONE
587 # define DEFIO_REC__PD7 defio_error_PD7_is_not_supported_on_TARGET
588 #endif
589 #if DEFIO_PORT_D_USED_MASK & BIT(8)
590 # define DEFIO_TAG__PD8 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 8)
591 # define DEFIO_TAG_E__PD8 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 8)
592 # define DEFIO_REC__PD8 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(8) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
593 #else
594 # define DEFIO_TAG__PD8 defio_error_PD8_is_not_supported_on_TARGET
595 # define DEFIO_TAG_E__PD8 DEFIO_TAG_E__NONE
596 # define DEFIO_REC__PD8 defio_error_PD8_is_not_supported_on_TARGET
597 #endif
598 #if DEFIO_PORT_D_USED_MASK & BIT(9)
599 # define DEFIO_TAG__PD9 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 9)
600 # define DEFIO_TAG_E__PD9 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 9)
601 # define DEFIO_REC__PD9 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(9) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
602 #else
603 # define DEFIO_TAG__PD9 defio_error_PD9_is_not_supported_on_TARGET
604 # define DEFIO_TAG_E__PD9 DEFIO_TAG_E__NONE
605 # define DEFIO_REC__PD9 defio_error_PD9_is_not_supported_on_TARGET
606 #endif
607 #if DEFIO_PORT_D_USED_MASK & BIT(10)
608 # define DEFIO_TAG__PD10 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 10)
609 # define DEFIO_TAG_E__PD10 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 10)
610 # define DEFIO_REC__PD10 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(10) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
611 #else
612 # define DEFIO_TAG__PD10 defio_error_PD10_is_not_supported_on_TARGET
613 # define DEFIO_TAG_E__PD10 DEFIO_TAG_E__NONE
614 # define DEFIO_REC__PD10 defio_error_PD10_is_not_supported_on_TARGET
615 #endif
616 #if DEFIO_PORT_D_USED_MASK & BIT(11)
617 # define DEFIO_TAG__PD11 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 11)
618 # define DEFIO_TAG_E__PD11 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 11)
619 # define DEFIO_REC__PD11 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(11) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
620 #else
621 # define DEFIO_TAG__PD11 defio_error_PD11_is_not_supported_on_TARGET
622 # define DEFIO_TAG_E__PD11 DEFIO_TAG_E__NONE
623 # define DEFIO_REC__PD11 defio_error_PD11_is_not_supported_on_TARGET
624 #endif
625 #if DEFIO_PORT_D_USED_MASK & BIT(12)
626 # define DEFIO_TAG__PD12 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 12)
627 # define DEFIO_TAG_E__PD12 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 12)
628 # define DEFIO_REC__PD12 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(12) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
629 #else
630 # define DEFIO_TAG__PD12 defio_error_PD12_is_not_supported_on_TARGET
631 # define DEFIO_TAG_E__PD12 DEFIO_TAG_E__NONE
632 # define DEFIO_REC__PD12 defio_error_PD12_is_not_supported_on_TARGET
633 #endif
634 #if DEFIO_PORT_D_USED_MASK & BIT(13)
635 # define DEFIO_TAG__PD13 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 13)
636 # define DEFIO_TAG_E__PD13 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 13)
637 # define DEFIO_REC__PD13 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(13) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
638 #else
639 # define DEFIO_TAG__PD13 defio_error_PD13_is_not_supported_on_TARGET
640 # define DEFIO_TAG_E__PD13 DEFIO_TAG_E__NONE
641 # define DEFIO_REC__PD13 defio_error_PD13_is_not_supported_on_TARGET
642 #endif
643 #if DEFIO_PORT_D_USED_MASK & BIT(14)
644 # define DEFIO_TAG__PD14 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 14)
645 # define DEFIO_TAG_E__PD14 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 14)
646 # define DEFIO_REC__PD14 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(14) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
647 #else
648 # define DEFIO_TAG__PD14 defio_error_PD14_is_not_supported_on_TARGET
649 # define DEFIO_TAG_E__PD14 DEFIO_TAG_E__NONE
650 # define DEFIO_REC__PD14 defio_error_PD14_is_not_supported_on_TARGET
651 #endif
652 #if DEFIO_PORT_D_USED_MASK & BIT(15)
653 # define DEFIO_TAG__PD15 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 15)
654 # define DEFIO_TAG_E__PD15 DEFIO_TAG_MAKE(DEFIO_GPIOID__D, 15)
655 # define DEFIO_REC__PD15 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_D_USED_MASK & (BIT(15) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT)
656 #else
657 # define DEFIO_TAG__PD15 defio_error_PD15_is_not_supported_on_TARGET
658 # define DEFIO_TAG_E__PD15 DEFIO_TAG_E__NONE
659 # define DEFIO_REC__PD15 defio_error_PD15_is_not_supported_on_TARGET
660 #endif
661 #if DEFIO_PORT_E_USED_MASK & BIT(0)
662 # define DEFIO_TAG__PE0 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 0)
663 # define DEFIO_TAG_E__PE0 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 0)
664 # define DEFIO_REC__PE0 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(0) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
665 #else
666 # define DEFIO_TAG__PE0 defio_error_PE0_is_not_supported_on_TARGET
667 # define DEFIO_TAG_E__PE0 DEFIO_TAG_E__NONE
668 # define DEFIO_REC__PE0 defio_error_PE0_is_not_supported_on_TARGET
669 #endif
670 #if DEFIO_PORT_E_USED_MASK & BIT(1)
671 # define DEFIO_TAG__PE1 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 1)
672 # define DEFIO_TAG_E__PE1 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 1)
673 # define DEFIO_REC__PE1 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(1) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
674 #else
675 # define DEFIO_TAG__PE1 defio_error_PE1_is_not_supported_on_TARGET
676 # define DEFIO_TAG_E__PE1 DEFIO_TAG_E__NONE
677 # define DEFIO_REC__PE1 defio_error_PE1_is_not_supported_on_TARGET
678 #endif
679 #if DEFIO_PORT_E_USED_MASK & BIT(2)
680 # define DEFIO_TAG__PE2 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 2)
681 # define DEFIO_TAG_E__PE2 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 2)
682 # define DEFIO_REC__PE2 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(2) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
683 #else
684 # define DEFIO_TAG__PE2 defio_error_PE2_is_not_supported_on_TARGET
685 # define DEFIO_TAG_E__PE2 DEFIO_TAG_E__NONE
686 # define DEFIO_REC__PE2 defio_error_PE2_is_not_supported_on_TARGET
687 #endif
688 #if DEFIO_PORT_E_USED_MASK & BIT(3)
689 # define DEFIO_TAG__PE3 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 3)
690 # define DEFIO_TAG_E__PE3 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 3)
691 # define DEFIO_REC__PE3 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(3) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
692 #else
693 # define DEFIO_TAG__PE3 defio_error_PE3_is_not_supported_on_TARGET
694 # define DEFIO_TAG_E__PE3 DEFIO_TAG_E__NONE
695 # define DEFIO_REC__PE3 defio_error_PE3_is_not_supported_on_TARGET
696 #endif
697 #if DEFIO_PORT_E_USED_MASK & BIT(4)
698 # define DEFIO_TAG__PE4 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 4)
699 # define DEFIO_TAG_E__PE4 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 4)
700 # define DEFIO_REC__PE4 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(4) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
701 #else
702 # define DEFIO_TAG__PE4 defio_error_PE4_is_not_supported_on_TARGET
703 # define DEFIO_TAG_E__PE4 DEFIO_TAG_E__NONE
704 # define DEFIO_REC__PE4 defio_error_PE4_is_not_supported_on_TARGET
705 #endif
706 #if DEFIO_PORT_E_USED_MASK & BIT(5)
707 # define DEFIO_TAG__PE5 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 5)
708 # define DEFIO_TAG_E__PE5 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 5)
709 # define DEFIO_REC__PE5 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(5) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
710 #else
711 # define DEFIO_TAG__PE5 defio_error_PE5_is_not_supported_on_TARGET
712 # define DEFIO_TAG_E__PE5 DEFIO_TAG_E__NONE
713 # define DEFIO_REC__PE5 defio_error_PE5_is_not_supported_on_TARGET
714 #endif
715 #if DEFIO_PORT_E_USED_MASK & BIT(6)
716 # define DEFIO_TAG__PE6 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 6)
717 # define DEFIO_TAG_E__PE6 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 6)
718 # define DEFIO_REC__PE6 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(6) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
719 #else
720 # define DEFIO_TAG__PE6 defio_error_PE6_is_not_supported_on_TARGET
721 # define DEFIO_TAG_E__PE6 DEFIO_TAG_E__NONE
722 # define DEFIO_REC__PE6 defio_error_PE6_is_not_supported_on_TARGET
723 #endif
724 #if DEFIO_PORT_E_USED_MASK & BIT(7)
725 # define DEFIO_TAG__PE7 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 7)
726 # define DEFIO_TAG_E__PE7 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 7)
727 # define DEFIO_REC__PE7 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(7) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
728 #else
729 # define DEFIO_TAG__PE7 defio_error_PE7_is_not_supported_on_TARGET
730 # define DEFIO_TAG_E__PE7 DEFIO_TAG_E__NONE
731 # define DEFIO_REC__PE7 defio_error_PE7_is_not_supported_on_TARGET
732 #endif
733 #if DEFIO_PORT_E_USED_MASK & BIT(8)
734 # define DEFIO_TAG__PE8 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 8)
735 # define DEFIO_TAG_E__PE8 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 8)
736 # define DEFIO_REC__PE8 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(8) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
737 #else
738 # define DEFIO_TAG__PE8 defio_error_PE8_is_not_supported_on_TARGET
739 # define DEFIO_TAG_E__PE8 DEFIO_TAG_E__NONE
740 # define DEFIO_REC__PE8 defio_error_PE8_is_not_supported_on_TARGET
741 #endif
742 #if DEFIO_PORT_E_USED_MASK & BIT(9)
743 # define DEFIO_TAG__PE9 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 9)
744 # define DEFIO_TAG_E__PE9 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 9)
745 # define DEFIO_REC__PE9 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(9) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
746 #else
747 # define DEFIO_TAG__PE9 defio_error_PE9_is_not_supported_on_TARGET
748 # define DEFIO_TAG_E__PE9 DEFIO_TAG_E__NONE
749 # define DEFIO_REC__PE9 defio_error_PE9_is_not_supported_on_TARGET
750 #endif
751 #if DEFIO_PORT_E_USED_MASK & BIT(10)
752 # define DEFIO_TAG__PE10 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 10)
753 # define DEFIO_TAG_E__PE10 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 10)
754 # define DEFIO_REC__PE10 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(10) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
755 #else
756 # define DEFIO_TAG__PE10 defio_error_PE10_is_not_supported_on_TARGET
757 # define DEFIO_TAG_E__PE10 DEFIO_TAG_E__NONE
758 # define DEFIO_REC__PE10 defio_error_PE10_is_not_supported_on_TARGET
759 #endif
760 #if DEFIO_PORT_E_USED_MASK & BIT(11)
761 # define DEFIO_TAG__PE11 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 11)
762 # define DEFIO_TAG_E__PE11 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 11)
763 # define DEFIO_REC__PE11 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(11) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
764 #else
765 # define DEFIO_TAG__PE11 defio_error_PE11_is_not_supported_on_TARGET
766 # define DEFIO_TAG_E__PE11 DEFIO_TAG_E__NONE
767 # define DEFIO_REC__PE11 defio_error_PE11_is_not_supported_on_TARGET
768 #endif
769 #if DEFIO_PORT_E_USED_MASK & BIT(12)
770 # define DEFIO_TAG__PE12 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 12)
771 # define DEFIO_TAG_E__PE12 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 12)
772 # define DEFIO_REC__PE12 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(12) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
773 #else
774 # define DEFIO_TAG__PE12 defio_error_PE12_is_not_supported_on_TARGET
775 # define DEFIO_TAG_E__PE12 DEFIO_TAG_E__NONE
776 # define DEFIO_REC__PE12 defio_error_PE12_is_not_supported_on_TARGET
777 #endif
778 #if DEFIO_PORT_E_USED_MASK & BIT(13)
779 # define DEFIO_TAG__PE13 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 13)
780 # define DEFIO_TAG_E__PE13 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 13)
781 # define DEFIO_REC__PE13 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(13) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
782 #else
783 # define DEFIO_TAG__PE13 defio_error_PE13_is_not_supported_on_TARGET
784 # define DEFIO_TAG_E__PE13 DEFIO_TAG_E__NONE
785 # define DEFIO_REC__PE13 defio_error_PE13_is_not_supported_on_TARGET
786 #endif
787 #if DEFIO_PORT_E_USED_MASK & BIT(14)
788 # define DEFIO_TAG__PE14 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 14)
789 # define DEFIO_TAG_E__PE14 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 14)
790 # define DEFIO_REC__PE14 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(14) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
791 #else
792 # define DEFIO_TAG__PE14 defio_error_PE14_is_not_supported_on_TARGET
793 # define DEFIO_TAG_E__PE14 DEFIO_TAG_E__NONE
794 # define DEFIO_REC__PE14 defio_error_PE14_is_not_supported_on_TARGET
795 #endif
796 #if DEFIO_PORT_E_USED_MASK & BIT(15)
797 # define DEFIO_TAG__PE15 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 15)
798 # define DEFIO_TAG_E__PE15 DEFIO_TAG_MAKE(DEFIO_GPIOID__E, 15)
799 # define DEFIO_REC__PE15 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_E_USED_MASK & (BIT(15) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT)
800 #else
801 # define DEFIO_TAG__PE15 defio_error_PE15_is_not_supported_on_TARGET
802 # define DEFIO_TAG_E__PE15 DEFIO_TAG_E__NONE
803 # define DEFIO_REC__PE15 defio_error_PE15_is_not_supported_on_TARGET
804 #endif
805 #if DEFIO_PORT_F_USED_MASK & BIT(0)
806 # define DEFIO_TAG__PF0 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 0)
807 # define DEFIO_TAG_E__PF0 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 0)
808 # define DEFIO_REC__PF0 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(0) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
809 #else
810 # define DEFIO_TAG__PF0 defio_error_PF0_is_not_supported_on_TARGET
811 # define DEFIO_TAG_E__PF0 DEFIO_TAG_E__NONE
812 # define DEFIO_REC__PF0 defio_error_PF0_is_not_supported_on_TARGET
813 #endif
814 #if DEFIO_PORT_F_USED_MASK & BIT(1)
815 # define DEFIO_TAG__PF1 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 1)
816 # define DEFIO_TAG_E__PF1 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 1)
817 # define DEFIO_REC__PF1 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(1) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
818 #else
819 # define DEFIO_TAG__PF1 defio_error_PF1_is_not_supported_on_TARGET
820 # define DEFIO_TAG_E__PF1 DEFIO_TAG_E__NONE
821 # define DEFIO_REC__PF1 defio_error_PF1_is_not_supported_on_TARGET
822 #endif
823 #if DEFIO_PORT_F_USED_MASK & BIT(2)
824 # define DEFIO_TAG__PF2 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 2)
825 # define DEFIO_TAG_E__PF2 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 2)
826 # define DEFIO_REC__PF2 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(2) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
827 #else
828 # define DEFIO_TAG__PF2 defio_error_PF2_is_not_supported_on_TARGET
829 # define DEFIO_TAG_E__PF2 DEFIO_TAG_E__NONE
830 # define DEFIO_REC__PF2 defio_error_PF2_is_not_supported_on_TARGET
831 #endif
832 #if DEFIO_PORT_F_USED_MASK & BIT(3)
833 # define DEFIO_TAG__PF3 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 3)
834 # define DEFIO_TAG_E__PF3 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 3)
835 # define DEFIO_REC__PF3 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(3) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
836 #else
837 # define DEFIO_TAG__PF3 defio_error_PF3_is_not_supported_on_TARGET
838 # define DEFIO_TAG_E__PF3 DEFIO_TAG_E__NONE
839 # define DEFIO_REC__PF3 defio_error_PF3_is_not_supported_on_TARGET
840 #endif
841 #if DEFIO_PORT_F_USED_MASK & BIT(4)
842 # define DEFIO_TAG__PF4 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 4)
843 # define DEFIO_TAG_E__PF4 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 4)
844 # define DEFIO_REC__PF4 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(4) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
845 #else
846 # define DEFIO_TAG__PF4 defio_error_PF4_is_not_supported_on_TARGET
847 # define DEFIO_TAG_E__PF4 DEFIO_TAG_E__NONE
848 # define DEFIO_REC__PF4 defio_error_PF4_is_not_supported_on_TARGET
849 #endif
850 #if DEFIO_PORT_F_USED_MASK & BIT(5)
851 # define DEFIO_TAG__PF5 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 5)
852 # define DEFIO_TAG_E__PF5 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 5)
853 # define DEFIO_REC__PF5 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(5) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
854 #else
855 # define DEFIO_TAG__PF5 defio_error_PF5_is_not_supported_on_TARGET
856 # define DEFIO_TAG_E__PF5 DEFIO_TAG_E__NONE
857 # define DEFIO_REC__PF5 defio_error_PF5_is_not_supported_on_TARGET
858 #endif
859 #if DEFIO_PORT_F_USED_MASK & BIT(6)
860 # define DEFIO_TAG__PF6 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 6)
861 # define DEFIO_TAG_E__PF6 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 6)
862 # define DEFIO_REC__PF6 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(6) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
863 #else
864 # define DEFIO_TAG__PF6 defio_error_PF6_is_not_supported_on_TARGET
865 # define DEFIO_TAG_E__PF6 DEFIO_TAG_E__NONE
866 # define DEFIO_REC__PF6 defio_error_PF6_is_not_supported_on_TARGET
867 #endif
868 #if DEFIO_PORT_F_USED_MASK & BIT(7)
869 # define DEFIO_TAG__PF7 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 7)
870 # define DEFIO_TAG_E__PF7 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 7)
871 # define DEFIO_REC__PF7 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(7) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
872 #else
873 # define DEFIO_TAG__PF7 defio_error_PF7_is_not_supported_on_TARGET
874 # define DEFIO_TAG_E__PF7 DEFIO_TAG_E__NONE
875 # define DEFIO_REC__PF7 defio_error_PF7_is_not_supported_on_TARGET
876 #endif
877 #if DEFIO_PORT_F_USED_MASK & BIT(8)
878 # define DEFIO_TAG__PF8 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 8)
879 # define DEFIO_TAG_E__PF8 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 8)
880 # define DEFIO_REC__PF8 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(8) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
881 #else
882 # define DEFIO_TAG__PF8 defio_error_PF8_is_not_supported_on_TARGET
883 # define DEFIO_TAG_E__PF8 DEFIO_TAG_E__NONE
884 # define DEFIO_REC__PF8 defio_error_PF8_is_not_supported_on_TARGET
885 #endif
886 #if DEFIO_PORT_F_USED_MASK & BIT(9)
887 # define DEFIO_TAG__PF9 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 9)
888 # define DEFIO_TAG_E__PF9 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 9)
889 # define DEFIO_REC__PF9 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(9) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
890 #else
891 # define DEFIO_TAG__PF9 defio_error_PF9_is_not_supported_on_TARGET
892 # define DEFIO_TAG_E__PF9 DEFIO_TAG_E__NONE
893 # define DEFIO_REC__PF9 defio_error_PF9_is_not_supported_on_TARGET
894 #endif
895 #if DEFIO_PORT_F_USED_MASK & BIT(10)
896 # define DEFIO_TAG__PF10 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 10)
897 # define DEFIO_TAG_E__PF10 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 10)
898 # define DEFIO_REC__PF10 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(10) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
899 #else
900 # define DEFIO_TAG__PF10 defio_error_PF10_is_not_supported_on_TARGET
901 # define DEFIO_TAG_E__PF10 DEFIO_TAG_E__NONE
902 # define DEFIO_REC__PF10 defio_error_PF10_is_not_supported_on_TARGET
903 #endif
904 #if DEFIO_PORT_F_USED_MASK & BIT(11)
905 # define DEFIO_TAG__PF11 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 11)
906 # define DEFIO_TAG_E__PF11 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 11)
907 # define DEFIO_REC__PF11 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(11) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
908 #else
909 # define DEFIO_TAG__PF11 defio_error_PF11_is_not_supported_on_TARGET
910 # define DEFIO_TAG_E__PF11 DEFIO_TAG_E__NONE
911 # define DEFIO_REC__PF11 defio_error_PF11_is_not_supported_on_TARGET
912 #endif
913 #if DEFIO_PORT_F_USED_MASK & BIT(12)
914 # define DEFIO_TAG__PF12 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 12)
915 # define DEFIO_TAG_E__PF12 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 12)
916 # define DEFIO_REC__PF12 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(12) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
917 #else
918 # define DEFIO_TAG__PF12 defio_error_PF12_is_not_supported_on_TARGET
919 # define DEFIO_TAG_E__PF12 DEFIO_TAG_E__NONE
920 # define DEFIO_REC__PF12 defio_error_PF12_is_not_supported_on_TARGET
921 #endif
922 #if DEFIO_PORT_F_USED_MASK & BIT(13)
923 # define DEFIO_TAG__PF13 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 13)
924 # define DEFIO_TAG_E__PF13 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 13)
925 # define DEFIO_REC__PF13 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(13) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
926 #else
927 # define DEFIO_TAG__PF13 defio_error_PF13_is_not_supported_on_TARGET
928 # define DEFIO_TAG_E__PF13 DEFIO_TAG_E__NONE
929 # define DEFIO_REC__PF13 defio_error_PF13_is_not_supported_on_TARGET
930 #endif
931 #if DEFIO_PORT_F_USED_MASK & BIT(14)
932 # define DEFIO_TAG__PF14 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 14)
933 # define DEFIO_TAG_E__PF14 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 14)
934 # define DEFIO_REC__PF14 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(14) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
935 #else
936 # define DEFIO_TAG__PF14 defio_error_PF14_is_not_supported_on_TARGET
937 # define DEFIO_TAG_E__PF14 DEFIO_TAG_E__NONE
938 # define DEFIO_REC__PF14 defio_error_PF14_is_not_supported_on_TARGET
939 #endif
940 #if DEFIO_PORT_F_USED_MASK & BIT(15)
941 # define DEFIO_TAG__PF15 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 15)
942 # define DEFIO_TAG_E__PF15 DEFIO_TAG_MAKE(DEFIO_GPIOID__F, 15)
943 # define DEFIO_REC__PF15 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_F_USED_MASK & (BIT(15) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT)
944 #else
945 # define DEFIO_TAG__PF15 defio_error_PF15_is_not_supported_on_TARGET
946 # define DEFIO_TAG_E__PF15 DEFIO_TAG_E__NONE
947 # define DEFIO_REC__PF15 defio_error_PF15_is_not_supported_on_TARGET
948 #endif
949 #if DEFIO_PORT_G_USED_MASK & BIT(0)
950 # define DEFIO_TAG__PG0 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 0)
951 # define DEFIO_TAG_E__PG0 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 0)
952 # define DEFIO_REC__PG0 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(0) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
953 #else
954 # define DEFIO_TAG__PG0 defio_error_PG0_is_not_supported_on_TARGET
955 # define DEFIO_TAG_E__PG0 DEFIO_TAG_E__NONE
956 # define DEFIO_REC__PG0 defio_error_PG0_is_not_supported_on_TARGET
957 #endif
958 #if DEFIO_PORT_G_USED_MASK & BIT(1)
959 # define DEFIO_TAG__PG1 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 1)
960 # define DEFIO_TAG_E__PG1 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 1)
961 # define DEFIO_REC__PG1 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(1) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
962 #else
963 # define DEFIO_TAG__PG1 defio_error_PG1_is_not_supported_on_TARGET
964 # define DEFIO_TAG_E__PG1 DEFIO_TAG_E__NONE
965 # define DEFIO_REC__PG1 defio_error_PG1_is_not_supported_on_TARGET
966 #endif
967 #if DEFIO_PORT_G_USED_MASK & BIT(2)
968 # define DEFIO_TAG__PG2 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 2)
969 # define DEFIO_TAG_E__PG2 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 2)
970 # define DEFIO_REC__PG2 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(2) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
971 #else
972 # define DEFIO_TAG__PG2 defio_error_PG2_is_not_supported_on_TARGET
973 # define DEFIO_TAG_E__PG2 DEFIO_TAG_E__NONE
974 # define DEFIO_REC__PG2 defio_error_PG2_is_not_supported_on_TARGET
975 #endif
976 #if DEFIO_PORT_G_USED_MASK & BIT(3)
977 # define DEFIO_TAG__PG3 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 3)
978 # define DEFIO_TAG_E__PG3 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 3)
979 # define DEFIO_REC__PG3 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(3) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
980 #else
981 # define DEFIO_TAG__PG3 defio_error_PG3_is_not_supported_on_TARGET
982 # define DEFIO_TAG_E__PG3 DEFIO_TAG_E__NONE
983 # define DEFIO_REC__PG3 defio_error_PG3_is_not_supported_on_TARGET
984 #endif
985 #if DEFIO_PORT_G_USED_MASK & BIT(4)
986 # define DEFIO_TAG__PG4 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 4)
987 # define DEFIO_TAG_E__PG4 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 4)
988 # define DEFIO_REC__PG4 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(4) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
989 #else
990 # define DEFIO_TAG__PG4 defio_error_PG4_is_not_supported_on_TARGET
991 # define DEFIO_TAG_E__PG4 DEFIO_TAG_E__NONE
992 # define DEFIO_REC__PG4 defio_error_PG4_is_not_supported_on_TARGET
993 #endif
994 #if DEFIO_PORT_G_USED_MASK & BIT(5)
995 # define DEFIO_TAG__PG5 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 5)
996 # define DEFIO_TAG_E__PG5 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 5)
997 # define DEFIO_REC__PG5 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(5) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
998 #else
999 # define DEFIO_TAG__PG5 defio_error_PG5_is_not_supported_on_TARGET
1000 # define DEFIO_TAG_E__PG5 DEFIO_TAG_E__NONE
1001 # define DEFIO_REC__PG5 defio_error_PG5_is_not_supported_on_TARGET
1002 #endif
1003 #if DEFIO_PORT_G_USED_MASK & BIT(6)
1004 # define DEFIO_TAG__PG6 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 6)
1005 # define DEFIO_TAG_E__PG6 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 6)
1006 # define DEFIO_REC__PG6 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(6) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
1007 #else
1008 # define DEFIO_TAG__PG6 defio_error_PG6_is_not_supported_on_TARGET
1009 # define DEFIO_TAG_E__PG6 DEFIO_TAG_E__NONE
1010 # define DEFIO_REC__PG6 defio_error_PG6_is_not_supported_on_TARGET
1011 #endif
1012 #if DEFIO_PORT_G_USED_MASK & BIT(7)
1013 # define DEFIO_TAG__PG7 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 7)
1014 # define DEFIO_TAG_E__PG7 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 7)
1015 # define DEFIO_REC__PG7 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(7) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
1016 #else
1017 # define DEFIO_TAG__PG7 defio_error_PG7_is_not_supported_on_TARGET
1018 # define DEFIO_TAG_E__PG7 DEFIO_TAG_E__NONE
1019 # define DEFIO_REC__PG7 defio_error_PG7_is_not_supported_on_TARGET
1020 #endif
1021 #if DEFIO_PORT_G_USED_MASK & BIT(8)
1022 # define DEFIO_TAG__PG8 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 8)
1023 # define DEFIO_TAG_E__PG8 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 8)
1024 # define DEFIO_REC__PG8 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(8) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
1025 #else
1026 # define DEFIO_TAG__PG8 defio_error_PG8_is_not_supported_on_TARGET
1027 # define DEFIO_TAG_E__PG8 DEFIO_TAG_E__NONE
1028 # define DEFIO_REC__PG8 defio_error_PG8_is_not_supported_on_TARGET
1029 #endif
1030 #if DEFIO_PORT_G_USED_MASK & BIT(9)
1031 # define DEFIO_TAG__PG9 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 9)
1032 # define DEFIO_TAG_E__PG9 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 9)
1033 # define DEFIO_REC__PG9 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(9) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
1034 #else
1035 # define DEFIO_TAG__PG9 defio_error_PG9_is_not_supported_on_TARGET
1036 # define DEFIO_TAG_E__PG9 DEFIO_TAG_E__NONE
1037 # define DEFIO_REC__PG9 defio_error_PG9_is_not_supported_on_TARGET
1038 #endif
1039 #if DEFIO_PORT_G_USED_MASK & BIT(10)
1040 # define DEFIO_TAG__PG10 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 10)
1041 # define DEFIO_TAG_E__PG10 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 10)
1042 # define DEFIO_REC__PG10 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(10) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
1043 #else
1044 # define DEFIO_TAG__PG10 defio_error_PG10_is_not_supported_on_TARGET
1045 # define DEFIO_TAG_E__PG10 DEFIO_TAG_E__NONE
1046 # define DEFIO_REC__PG10 defio_error_PG10_is_not_supported_on_TARGET
1047 #endif
1048 #if DEFIO_PORT_G_USED_MASK & BIT(11)
1049 # define DEFIO_TAG__PG11 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 11)
1050 # define DEFIO_TAG_E__PG11 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 11)
1051 # define DEFIO_REC__PG11 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(11) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
1052 #else
1053 # define DEFIO_TAG__PG11 defio_error_PG11_is_not_supported_on_TARGET
1054 # define DEFIO_TAG_E__PG11 DEFIO_TAG_E__NONE
1055 # define DEFIO_REC__PG11 defio_error_PG11_is_not_supported_on_TARGET
1056 #endif
1057 #if DEFIO_PORT_G_USED_MASK & BIT(12)
1058 # define DEFIO_TAG__PG12 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 12)
1059 # define DEFIO_TAG_E__PG12 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 12)
1060 # define DEFIO_REC__PG12 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(12) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
1061 #else
1062 # define DEFIO_TAG__PG12 defio_error_PG12_is_not_supported_on_TARGET
1063 # define DEFIO_TAG_E__PG12 DEFIO_TAG_E__NONE
1064 # define DEFIO_REC__PG12 defio_error_PG12_is_not_supported_on_TARGET
1065 #endif
1066 #if DEFIO_PORT_G_USED_MASK & BIT(13)
1067 # define DEFIO_TAG__PG13 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 13)
1068 # define DEFIO_TAG_E__PG13 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 13)
1069 # define DEFIO_REC__PG13 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(13) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
1070 #else
1071 # define DEFIO_TAG__PG13 defio_error_PG13_is_not_supported_on_TARGET
1072 # define DEFIO_TAG_E__PG13 DEFIO_TAG_E__NONE
1073 # define DEFIO_REC__PG13 defio_error_PG13_is_not_supported_on_TARGET
1074 #endif
1075 #if DEFIO_PORT_G_USED_MASK & BIT(14)
1076 # define DEFIO_TAG__PG14 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 14)
1077 # define DEFIO_TAG_E__PG14 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 14)
1078 # define DEFIO_REC__PG14 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(14) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
1079 #else
1080 # define DEFIO_TAG__PG14 defio_error_PG14_is_not_supported_on_TARGET
1081 # define DEFIO_TAG_E__PG14 DEFIO_TAG_E__NONE
1082 # define DEFIO_REC__PG14 defio_error_PG14_is_not_supported_on_TARGET
1083 #endif
1084 #if DEFIO_PORT_G_USED_MASK & BIT(15)
1085 # define DEFIO_TAG__PG15 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 15)
1086 # define DEFIO_TAG_E__PG15 DEFIO_TAG_MAKE(DEFIO_GPIOID__G, 15)
1087 # define DEFIO_REC__PG15 DEFIO_REC_INDEXED(BITCOUNT(DEFIO_PORT_G_USED_MASK & (BIT(15) - 1)) + DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT)
1088 #else
1089 # define DEFIO_TAG__PG15 defio_error_PG15_is_not_supported_on_TARGET
1090 # define DEFIO_TAG_E__PG15 DEFIO_TAG_E__NONE
1091 # define DEFIO_REC__PG15 defio_error_PG15_is_not_supported_on_TARGET
1092 #endif
1094 // DEFIO_IO_USED_COUNT is number of io pins supported on target
1095 #define DEFIO_IO_USED_COUNT (DEFIO_PORT_A_USED_COUNT+DEFIO_PORT_B_USED_COUNT+DEFIO_PORT_C_USED_COUNT+DEFIO_PORT_D_USED_COUNT+DEFIO_PORT_E_USED_COUNT+DEFIO_PORT_F_USED_COUNT+DEFIO_PORT_G_USED_COUNT)
1097 // DEFIO_PORT_USED_LIST - comma separated list of bitmask for all used ports.
1098 // DEFIO_PORT_OFFSET_LIST - comma separated list of port offsets (count of pins before this port)
1099 // unused ports on end of list are skipped
1100 #if !defined DEFIO_PORT_USED_LIST && DEFIO_PORT_G_USED_COUNT > 0
1101 # define DEFIO_PORT_USED_COUNT 7
1102 # define DEFIO_PORT_USED_LIST DEFIO_PORT_A_USED_MASK,DEFIO_PORT_B_USED_MASK,DEFIO_PORT_C_USED_MASK,DEFIO_PORT_D_USED_MASK,DEFIO_PORT_E_USED_MASK,DEFIO_PORT_F_USED_MASK,DEFIO_PORT_G_USED_MASK
1103 # define DEFIO_PORT_OFFSET_LIST DEFIO_PORT_A_OFFSET,DEFIO_PORT_B_OFFSET,DEFIO_PORT_C_OFFSET,DEFIO_PORT_D_OFFSET,DEFIO_PORT_E_OFFSET,DEFIO_PORT_F_OFFSET,DEFIO_PORT_G_OFFSET
1104 #endif
1105 #if !defined DEFIO_PORT_USED_LIST && DEFIO_PORT_F_USED_COUNT > 0
1106 # define DEFIO_PORT_USED_COUNT 6
1107 # define DEFIO_PORT_USED_LIST DEFIO_PORT_A_USED_MASK,DEFIO_PORT_B_USED_MASK,DEFIO_PORT_C_USED_MASK,DEFIO_PORT_D_USED_MASK,DEFIO_PORT_E_USED_MASK,DEFIO_PORT_F_USED_MASK
1108 # define DEFIO_PORT_OFFSET_LIST DEFIO_PORT_A_OFFSET,DEFIO_PORT_B_OFFSET,DEFIO_PORT_C_OFFSET,DEFIO_PORT_D_OFFSET,DEFIO_PORT_E_OFFSET,DEFIO_PORT_F_OFFSET
1109 #endif
1110 #if !defined DEFIO_PORT_USED_LIST && DEFIO_PORT_E_USED_COUNT > 0
1111 # define DEFIO_PORT_USED_COUNT 5
1112 # define DEFIO_PORT_USED_LIST DEFIO_PORT_A_USED_MASK,DEFIO_PORT_B_USED_MASK,DEFIO_PORT_C_USED_MASK,DEFIO_PORT_D_USED_MASK,DEFIO_PORT_E_USED_MASK
1113 # define DEFIO_PORT_OFFSET_LIST DEFIO_PORT_A_OFFSET,DEFIO_PORT_B_OFFSET,DEFIO_PORT_C_OFFSET,DEFIO_PORT_D_OFFSET,DEFIO_PORT_E_OFFSET
1114 #endif
1115 #if !defined DEFIO_PORT_USED_LIST && DEFIO_PORT_D_USED_COUNT > 0
1116 # define DEFIO_PORT_USED_COUNT 4
1117 # define DEFIO_PORT_USED_LIST DEFIO_PORT_A_USED_MASK,DEFIO_PORT_B_USED_MASK,DEFIO_PORT_C_USED_MASK,DEFIO_PORT_D_USED_MASK
1118 # define DEFIO_PORT_OFFSET_LIST DEFIO_PORT_A_OFFSET,DEFIO_PORT_B_OFFSET,DEFIO_PORT_C_OFFSET,DEFIO_PORT_D_OFFSET
1119 #endif
1120 #if !defined DEFIO_PORT_USED_LIST && DEFIO_PORT_C_USED_COUNT > 0
1121 # define DEFIO_PORT_USED_COUNT 3
1122 # define DEFIO_PORT_USED_LIST DEFIO_PORT_A_USED_MASK,DEFIO_PORT_B_USED_MASK,DEFIO_PORT_C_USED_MASK
1123 # define DEFIO_PORT_OFFSET_LIST DEFIO_PORT_A_OFFSET,DEFIO_PORT_B_OFFSET,DEFIO_PORT_C_OFFSET
1124 #endif
1125 #if !defined DEFIO_PORT_USED_LIST && DEFIO_PORT_B_USED_COUNT > 0
1126 # define DEFIO_PORT_USED_COUNT 2
1127 # define DEFIO_PORT_USED_LIST DEFIO_PORT_A_USED_MASK,DEFIO_PORT_B_USED_MASK
1128 # define DEFIO_PORT_OFFSET_LIST DEFIO_PORT_A_OFFSET,DEFIO_PORT_B_OFFSET
1129 #endif
1130 #if !defined DEFIO_PORT_USED_LIST && DEFIO_PORT_A_USED_COUNT > 0
1131 # define DEFIO_PORT_USED_COUNT 1
1132 # define DEFIO_PORT_USED_LIST DEFIO_PORT_A_USED_MASK
1133 # define DEFIO_PORT_OFFSET_LIST DEFIO_PORT_A_OFFSET
1134 #endif
1136 #if !defined DEFIO_PORT_USED_LIST
1137 # warning "No pins are defined. Maybe you forgot to define TARGET_IO_PORTx in target_io.h"
1138 # define DEFIO_PORT_USED_COUNT 0
1139 # define DEFIO_PORT_USED_LIST /* empty */
1140 # define DEFIO_PORT_OFFSET_LIST /* empty */
1141 #endif