aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/boards.cpp
blob: 66f008f44e68a07bc106ca6c648fa76a971f3ad3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
#include "boards.h"

// think of the poor column numbers
#define ADCx ADC_INVALID
#define TIMERx TIMER_INVALID

#if defined(BOARD_maple)

PinMapping PIN_MAP[NR_GPIO_PINS] = {
    /* D0/PA3 */
    {GPIOA,  3,    3, TIMER2_CH4_CCR, TIMER2,      4, AFIO_EXTI_PA},
    /* D1/PA2 */
    {GPIOA,  2,    2, TIMER2_CH3_CCR, TIMER2,      3, AFIO_EXTI_PA},
    /* D2/PA0 */
    {GPIOA,  0,    0, TIMER2_CH1_CCR, TIMER2,      1, AFIO_EXTI_PA},
    /* D3/PA1 */
    {GPIOA,  1,    1, TIMER2_CH2_CCR, TIMER2,      2, AFIO_EXTI_PA},
    /* D4/PB5 */
    {GPIOB,  5, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D5/PB6 */
    {GPIOB,  6, ADCx, TIMER4_CH1_CCR, TIMER4,      1, AFIO_EXTI_PB},
    /* D6/PA8 */
    {GPIOA,  8, ADCx, TIMER1_CH1_CCR, TIMER1,      1, AFIO_EXTI_PA},
    /* D7/PA9 */
    {GPIOA,  9, ADCx, TIMER1_CH2_CCR, TIMER1,      2, AFIO_EXTI_PA},
    /* D8/PA10 */
    {GPIOA, 10, ADCx, TIMER1_CH3_CCR, TIMER1,      3, AFIO_EXTI_PA},
    /* D9/PB7 */
    {GPIOB,  7, ADCx, TIMER4_CH2_CCR, TIMER4,      2, AFIO_EXTI_PB},
    /* D10/PA4 */
    {GPIOA,  4,    4,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D11/PA7 */
    {GPIOA,  7,    7, TIMER3_CH2_CCR, TIMER3,      2, AFIO_EXTI_PA},
    /* D12/PA6 */
    {GPIOA,  6,    6, TIMER3_CH1_CCR, TIMER3,      1, AFIO_EXTI_PA},
    /* D13/PA5 */
    {GPIOA,  5,    5,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D14/PB8 */
    {GPIOB,  8, ADCx, TIMER4_CH3_CCR, TIMER4,      3, AFIO_EXTI_PB},

    /* Little header */

    /* D15/PC0 */
    {GPIOC,  0,   10,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D16/PC1 */
    {GPIOC,  1,   11,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D17/PC2 */
    {GPIOC,  2,   12,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D18/PC3 */
    {GPIOC,  3,   13,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D19/PC4 */
    {GPIOC,  4,   14,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D20/PC5 */
    {GPIOC,  5,   15,              0, TIMERx, TIMERx, AFIO_EXTI_PC},

    /* External header */

    /* D21/PC13 */
    {GPIOC, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D22/PC14 */
    {GPIOC, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D23/PC15 */
    {GPIOC, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D24/PB9 */
    {GPIOB,  9, ADCx, TIMER4_CH4_CCR, TIMER4,      4, AFIO_EXTI_PB},
    /* D25/PD2 */
    {GPIOD,  2, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D26/PC10 */
    {GPIOC, 10, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D27/PB0 */
    {GPIOB,  0,    8, TIMER3_CH3_CCR, TIMER3,      3, AFIO_EXTI_PB},
    /* D28/PB1 */
    {GPIOB,  1,    9, TIMER3_CH4_CCR, TIMER3,      4, AFIO_EXTI_PB},
    /* D29/PB10 */
    {GPIOB, 10, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D30/PB11 */
    {GPIOB, 11, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D31/PB12 */
    {GPIOB, 12, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D32/PB13 */
    {GPIOB, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D33/PB14 */
    {GPIOB, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D34/PB15 */
    {GPIOB, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D35/PC6 */
    {GPIOC,  6, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D36/PC7 */
    {GPIOC,  7, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D37/PC8 */
    {GPIOC,  8, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D38/PC9 (BUT) */
    {GPIOC,  9, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC}
};

#elif defined(BOARD_maple_native)

PinMapping PIN_MAP[NR_GPIO_PINS] = {
    /* Top header */

    /* D0/PB10 */
    {GPIOB, 10, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D1/PB2 */
    {GPIOB,  2, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D2/PB12 */
    {GPIOB, 12, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D3/PB13 */
    {GPIOB, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D4/PB14 */
    {GPIOB, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D5/PB15 */
    {GPIOB, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D6/PC0 */
    {GPIOC,  0,   10,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D7/PC1 */
    {GPIOC,  1,   11,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D8/PC2 */
    {GPIOC,  2,   12,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D9/PC3 */
    {GPIOC,  3,   13,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D10/PC4 */
    {GPIOC,  4,   14,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D11/PC5 */
    {GPIOC,  5,   15,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D12/PC6 */
    {GPIOC,  6, ADCx, TIMER8_CH1_CCR, TIMER8,      1, AFIO_EXTI_PC},
    /* D13/PC7 */
    {GPIOC,  7, ADCx, TIMER8_CH2_CCR, TIMER8,      2, AFIO_EXTI_PC},
    /* D14/PC8 */
    {GPIOC,  8, ADCx, TIMER8_CH3_CCR, TIMER8,      3, AFIO_EXTI_PC},
    /* D15/PC9 */
    {GPIOC,  9, ADCx, TIMER8_CH4_CCR, TIMER8,      4, AFIO_EXTI_PC},
    /* D16/PC10 */
    {GPIOC, 10, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D17/PC11 */
    {GPIOC, 11, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D18/PC12 */
    {GPIOC, 12, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D19/PC13 */
    {GPIOC, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D20/PC14 */
    {GPIOC, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D21/PC15 */
    {GPIOC, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D22/PA8 */
    {GPIOA,  8, ADCx, TIMER1_CH1_CCR, TIMER1,      1, AFIO_EXTI_PA},
    /* D23/PA9 */
    {GPIOA,  9, ADCx, TIMER1_CH2_CCR, TIMER1,      2, AFIO_EXTI_PA},
    /* D24/PA10 */
    {GPIOA, 10, ADCx, TIMER1_CH3_CCR, TIMER1,      3, AFIO_EXTI_PA},
    /* D25/PB9 */
    {GPIOB,  9, ADCx, TIMER4_CH4_CCR, TIMER4,      4, AFIO_EXTI_PB},

    /* Bottom header */

    /* D26/PD2 */
    {GPIOD,  2, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D27/PD3 */
    {GPIOD,  3, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D28/PD6 */
    {GPIOD,  6, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D29/PG11 */
    {GPIOG, 11, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D30/PG12 */
    {GPIOG, 12, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D31/PG13 */
    {GPIOG, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D32/PG14 */
    {GPIOG, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D33/PG8 */
    {GPIOG,  8, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D34/PG7 */
    {GPIOG,  7, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D35/PG6 */
    {GPIOG,  6, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D36/PB5 */
    {GPIOB,  5, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D37/PB6 */
    {GPIOB,  6, ADCx, TIMER4_CH1_CCR, TIMER4,      1, AFIO_EXTI_PB},
    /* D38/PB7 */
    {GPIOB,  7, ADCx, TIMER4_CH2_CCR, TIMER4,      2, AFIO_EXTI_PB},
    /* D39/PF6 */
    {GPIOF,  6,    4,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D40/PF7 */
    {GPIOF,  7,    5,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D41/PF8 */
    {GPIOF,  8,    6,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D42/PF9 */
    {GPIOF,  9,    7,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D43/PF10 */
    {GPIOF, 10,    8,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D44/PF11 */
    {GPIOF, 11, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D45/PB1 */
    {GPIOB,  1,    9, TIMER3_CH4_CCR, TIMER3,      4, AFIO_EXTI_PB},
    /* D46/PB0 */
    {GPIOB,  0,    8, TIMER3_CH3_CCR, TIMER3,      3, AFIO_EXTI_PB},
    /* D47/PA0 */
    {GPIOA,  0,    0, TIMER5_CH1_CCR, TIMER5,      1, AFIO_EXTI_PA},
    /* D48/PA1 */ /* FIXME (?)
       What about D48--D50 also being TIMER2_CH[234]? */
    {GPIOA,  1,    1, TIMER5_CH2_CCR, TIMER5,      2, AFIO_EXTI_PA},
    /* D49/PA2 */
    {GPIOA,  2,    2, TIMER5_CH3_CCR, TIMER5,      3, AFIO_EXTI_PA},
    /* D50/PA3 */
    {GPIOA,  3,    3, TIMER5_CH4_CCR, TIMER5,      4, AFIO_EXTI_PA},
    /* D51/PA4 */
    {GPIOA,  4,    4,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D52/PA5 */
    {GPIOA,  5,    5,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D53/PA6 */
    {GPIOA,  6,    6, TIMER3_CH1_CCR, TIMER3,      1, AFIO_EXTI_PA},
    /* D54/PA7 */
    {GPIOA,  7,    7, TIMER3_CH2_CCR, TIMER3,      2, AFIO_EXTI_PA},

    /* Right (triple) header */

    /* D55/PF0 */
    {GPIOF,  0, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D56/PD11 */
    {GPIOD, 11, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D57/PD14 */
    {GPIOD, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D58/PF1 */
    {GPIOF,  1, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D59/PD12 */
    {GPIOD, 12, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D60/PD15 */
    {GPIOD, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D61/PF2 */
    {GPIOF,  2, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D62/PD13 */
    {GPIOD, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D63/PD0 */
    {GPIOD,  0, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D64/PF3 */
    {GPIOF,  3, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D65/PE3 */
    {GPIOE,  3, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D66/PD1 */
    {GPIOD,  1, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D67/PF4 */
    {GPIOF,  4, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D68/PE4 */
    {GPIOE,  4, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D69/PE7 */
    {GPIOE,  7, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D70/PF5 */
    {GPIOF,  5, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D71/PE5 */
    {GPIOE,  5, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D72/PE8 */
    {GPIOE,  8, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D73/PF12 */
    {GPIOF, 12, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D74/PE6 */
    {GPIOE,  6, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D75/PE9 */
    {GPIOE,  9, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D76/PF13 */
    {GPIOF, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D77/PE10 */
    {GPIOE, 10, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D78/PF14 */
    {GPIOF, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D79/PG9 */
    {GPIOG,  9, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D80/PE11 */
    {GPIOE, 11, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D81/PF15 */
    {GPIOF, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PF},
    /* D82/PG10 */
    {GPIOG, 10, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D83/PE12 */
    {GPIOE, 12, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D84/PG0 */
    {GPIOG,  0, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D85/PD5 */
    {GPIOD,  5, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D86/PE13 */
    {GPIOE, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D87/PG1 */
    {GPIOG,  1, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D88/PD4 */
    {GPIOD,  4, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D89/PE14 */
    {GPIOE, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D90/PG2 */
    {GPIOG,  2, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D91/PE1 */
    {GPIOE,  1, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D92/PE15 */
    {GPIOE, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D93/PG3 */
    {GPIOG,  3, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D94/PE0 */
    {GPIOE,  0, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PE},
    /* D95/PD8 */
    {GPIOD,  8, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D96/PG4 */
    {GPIOG,  4, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D97/PD9 */
    {GPIOD,  9, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D98/PG5 */
    {GPIOG,  5, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PG},
    /* D99/PD10 */
    {GPIOD, 10, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD}
};

#elif defined(BOARD_maple_mini)

PinMapping PIN_MAP[NR_GPIO_PINS] = {
    /* D0/PB11 */
    {GPIOB, 11, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D1/PB10 */
    {GPIOB, 10, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D2/PB2 */
    {GPIOB,  2, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D3/PB0 */
    {GPIOB,  0,    8, TIMER3_CH3_CCR, TIMER3,      3, AFIO_EXTI_PB},
    /* D4/PA7 */
    {GPIOA,  7,    7, TIMER3_CH2_CCR, TIMER3,      2, AFIO_EXTI_PA},
    /* D5/PA6 */
    {GPIOA,  6,    6, TIMER3_CH1_CCR, TIMER3,      1, AFIO_EXTI_PA},
    /* D6/PA5 */
    {GPIOA,  5,    5,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D7/PA4 */
    {GPIOA,  4,    4,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D8/PA3 */
    {GPIOA,  3,    3, TIMER2_CH4_CCR, TIMER2,      4, AFIO_EXTI_PA},
    /* D9/PA2 */
    {GPIOA,  2,    2, TIMER2_CH3_CCR, TIMER2,      3, AFIO_EXTI_PA},
    /* D10/PA1 */
    {GPIOA,  1,    1, TIMER2_CH2_CCR, TIMER2,      2, AFIO_EXTI_PA},
    /* D11/PA0 */
    {GPIOA,  0,    0, TIMER2_CH1_CCR, TIMER2,      1, AFIO_EXTI_PA},
    /* D12/PC15 */
    {GPIOC, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D13/PC14 */
    {GPIOC, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D14/PC13 */
    {GPIOC, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D15/PB7 */
    {GPIOB,  7, ADCx, TIMER4_CH2_CCR, TIMER4,      2, AFIO_EXTI_PB},
    /* D16/PB6 */
    {GPIOB,  6, ADCx, TIMER4_CH1_CCR, TIMER4,      1, AFIO_EXTI_PB},
    /* D17/PB5 */
    {GPIOB,  5, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D18/PB4 */
    {GPIOB,  4, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D19/PB3 */
    {GPIOB,  3, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D20/PA15 */
    {GPIOA, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D21/PA14 */
    {GPIOA, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D22/PA13 */
    {GPIOA, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D23/PA12 */
    {GPIOA, 12, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D24/PA11 */
    {GPIOA, 11, ADCx, TIMER1_CH4_CCR, TIMER1,      4, AFIO_EXTI_PA},
    /* D25/PA10 */
    {GPIOA, 10, ADCx, TIMER1_CH3_CCR, TIMER1,      3, AFIO_EXTI_PA},
    /* D26/PA9 */
    {GPIOA,  9, ADCx, TIMER1_CH2_CCR, TIMER2,      2, AFIO_EXTI_PA},
    /* D27/PA8 */
    {GPIOA,  8, ADCx, TIMER1_CH1_CCR, TIMER1,      1, AFIO_EXTI_PA},
    /* D28/PB15 */
    {GPIOB, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D29/PB14 */
    {GPIOB, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D30/PB13 */
    {GPIOB, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D31/PB12 */
    {GPIOB, 12, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D32/PB8 */
    {GPIOB,  8, ADCx, TIMER4_CH3_CCR, TIMER4,      3, AFIO_EXTI_PB},
    /* D33/PB1 */
    {GPIOB,  1,    9, TIMER3_CH4_CCR, TIMER3,      4, AFIO_EXTI_PB},
};

#elif defined(BOARD_maple_RET6)

PinMapping PIN_MAP[NR_GPIO_PINS] = {
    /* D0/PA3 */
    {GPIOA,  3,    3, TIMER2_CH4_CCR, TIMER2,      4, AFIO_EXTI_PA},
    /* D1/PA2 */
    {GPIOA,  2,    2, TIMER2_CH3_CCR, TIMER2,      3, AFIO_EXTI_PA},
    /* D2/PA0 */
    {GPIOA,  0,    0, TIMER2_CH1_CCR, TIMER2,      1, AFIO_EXTI_PA},
    /* D3/PA1 */
    {GPIOA,  1,    1, TIMER2_CH2_CCR, TIMER2,      2, AFIO_EXTI_PA},
    /* D4/PB5 */
    {GPIOB,  5, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D5/PB6 */
    {GPIOB,  6, ADCx, TIMER4_CH1_CCR, TIMER4,      1, AFIO_EXTI_PB},
    /* D6/PA8 */
    {GPIOA,  8, ADCx, TIMER1_CH1_CCR, TIMER1,      1, AFIO_EXTI_PA},
    /* D7/PA9 */
    {GPIOA,  9, ADCx, TIMER1_CH2_CCR, TIMER1,      2, AFIO_EXTI_PA},
    /* D8/PA10 */
    {GPIOA, 10, ADCx, TIMER1_CH3_CCR, TIMER1,      3, AFIO_EXTI_PA},
    /* D9/PB7 */
    {GPIOB,  7, ADCx, TIMER4_CH2_CCR, TIMER4,      2, AFIO_EXTI_PB},
    /* D10/PA4 */
    {GPIOA,  4,    4,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D11/PA7 */
    {GPIOA,  7,    7, TIMER3_CH2_CCR, TIMER3,      2, AFIO_EXTI_PA},
    /* D12/PA6 */
    {GPIOA,  6,    6, TIMER3_CH1_CCR, TIMER3,      1, AFIO_EXTI_PA},
    /* D13/PA5 */
    {GPIOA,  5,    5,              0, TIMERx, TIMERx, AFIO_EXTI_PA},
    /* D14/PB8 */
    {GPIOB,  8, ADCx, TIMER4_CH3_CCR, TIMER4,      3, AFIO_EXTI_PB},

    /* Little header */

    /* D15/PC0 */
    {GPIOC,  0,   10,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D16/PC1 */
    {GPIOC,  1,   11,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D17/PC2 */
    {GPIOC,  2,   12,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D18/PC3 */
    {GPIOC,  3,   13,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D19/PC4 */
    {GPIOC,  4,   14,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D20/PC5 */
    {GPIOC,  5,   15,              0, TIMERx, TIMERx, AFIO_EXTI_PC},

    /* External header */

    /* D21/PC13 */
    {GPIOC, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D22/PC14 */
    {GPIOC, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D23/PC15 */
    {GPIOC, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D24/PB9 */
    {GPIOB,  9, ADCx, TIMER4_CH4_CCR, TIMER4,      4, AFIO_EXTI_PB},
    /* D25/PD2 */
    {GPIOD,  2, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PD},
    /* D26/PC10 */
    {GPIOC, 10, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PC},
    /* D27/PB0 */
    {GPIOB,  0,    8, TIMER3_CH3_CCR, TIMER3,      3, AFIO_EXTI_PB},
    /* D28/PB1 */
    {GPIOB,  1,    9, TIMER3_CH4_CCR, TIMER3,      4, AFIO_EXTI_PB},
    /* D29/PB10 */
    {GPIOB, 10, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D30/PB11 */
    {GPIOB, 11, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D31/PB12 */
    {GPIOB, 12, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D32/PB13 */
    {GPIOB, 13, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D33/PB14 */
    {GPIOB, 14, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D34/PB15 */
    {GPIOB, 15, ADCx,              0, TIMERx, TIMERx, AFIO_EXTI_PB},
    /* D35/PC6 */
    {GPIOC,  6, ADCx, TIMER8_CH1_CCR, TIMER8,      1, AFIO_EXTI_PC},
    /* D36/PC7 */
    {GPIOC,  7, ADCx, TIMER8_CH1_CCR, TIMER8,      2, AFIO_EXTI_PC},
    /* D37/PC8 */
    {GPIOC,  8, ADCx, TIMER8_CH1_CCR, TIMER8,      3, AFIO_EXTI_PC},
    /* D38/PC9 (BUT) */
    {GPIOC,  9, ADCx, TIMER8_CH1_CCR, TIMER8,      4, AFIO_EXTI_PC}
};

#else

#error "Board type has not been selected correctly."

#endif