Loading...
Searching...
No Matches
arduino_board_pins.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 Otto-von-Guericke-Universität Magdeburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
23#ifndef ARDUINO_BOARD_PINS_H
24#define ARDUINO_BOARD_PINS_H
25
26#include "arduino_iomap.h"
27#include "periph/gpio.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#ifdef DOXYGEN
39#define ARDUINO_LED /* board specific number */
40
46#define ARDUINO_PIN_LAST /* board specific number */
47#endif /* DOXYGEN */
48
49#if !defined(ARDUINO_LED) && !defined(DOXYGEN)
50#define ARDUINO_LED (13)
51#endif
52
53#ifndef ARDUINO_PIN_LAST
54# error "ARDUINO_PIN_LAST undefined"
55#endif
56
76static const gpio_t arduino_pinmap[] = {
77#ifndef DOXYGEN
78#ifdef ARDUINO_PIN_0
79 ARDUINO_PIN_0,
80#elif ARDUINO_PIN_LAST > 0
82#endif
83#ifdef ARDUINO_PIN_1
84 ARDUINO_PIN_1,
85#elif ARDUINO_PIN_LAST > 1
87#endif
88#ifdef ARDUINO_PIN_2
89 ARDUINO_PIN_2,
90#elif ARDUINO_PIN_LAST > 2
92#endif
93#ifdef ARDUINO_PIN_3
94 ARDUINO_PIN_3,
95#elif ARDUINO_PIN_LAST > 3
97#endif
98#ifdef ARDUINO_PIN_4
99 ARDUINO_PIN_4,
100#elif ARDUINO_PIN_LAST > 4
102#endif
103#ifdef ARDUINO_PIN_5
104 ARDUINO_PIN_5,
105#elif ARDUINO_PIN_LAST > 5
107#endif
108#ifdef ARDUINO_PIN_6
109 ARDUINO_PIN_6,
110#elif ARDUINO_PIN_LAST > 6
112#endif
113#ifdef ARDUINO_PIN_7
114 ARDUINO_PIN_7,
115#elif ARDUINO_PIN_LAST > 7
117#endif
118#ifdef ARDUINO_PIN_8
119 ARDUINO_PIN_8,
120#elif ARDUINO_PIN_LAST > 8
122#endif
123#ifdef ARDUINO_PIN_9
124 ARDUINO_PIN_9,
125#elif ARDUINO_PIN_LAST > 9
127#endif
128#ifdef ARDUINO_PIN_10
129 ARDUINO_PIN_10,
130#elif ARDUINO_PIN_LAST > 10
132#endif
133#ifdef ARDUINO_PIN_11
134 ARDUINO_PIN_11,
135#elif ARDUINO_PIN_LAST > 11
137#endif
138#ifdef ARDUINO_PIN_12
139 ARDUINO_PIN_12,
140#elif ARDUINO_PIN_LAST > 12
142#endif
143#ifdef ARDUINO_PIN_13
144 ARDUINO_PIN_13,
145#elif ARDUINO_PIN_LAST > 13
147#endif
148#ifdef ARDUINO_PIN_14
149 ARDUINO_PIN_14,
150#elif ARDUINO_PIN_LAST > 14
152#endif
153#ifdef ARDUINO_PIN_15
154 ARDUINO_PIN_15,
155#elif ARDUINO_PIN_LAST > 15
157#endif
158#ifdef ARDUINO_PIN_16
159 ARDUINO_PIN_16,
160#elif ARDUINO_PIN_LAST > 16
162#endif
163#ifdef ARDUINO_PIN_17
164 ARDUINO_PIN_17,
165#elif ARDUINO_PIN_LAST > 17
167#endif
168#ifdef ARDUINO_PIN_18
169 ARDUINO_PIN_18,
170#elif ARDUINO_PIN_LAST > 18
172#endif
173#ifdef ARDUINO_PIN_19
174 ARDUINO_PIN_19,
175#elif ARDUINO_PIN_LAST > 19
177#endif
178#ifdef ARDUINO_PIN_20
179 ARDUINO_PIN_20,
180#elif ARDUINO_PIN_LAST > 20
182#endif
183#ifdef ARDUINO_PIN_21
184 ARDUINO_PIN_21,
185#elif ARDUINO_PIN_LAST > 21
187#endif
188#ifdef ARDUINO_PIN_22
189 ARDUINO_PIN_22,
190#elif ARDUINO_PIN_LAST > 22
192#endif
193#ifdef ARDUINO_PIN_23
194 ARDUINO_PIN_23,
195#elif ARDUINO_PIN_LAST > 23
197#endif
198#ifdef ARDUINO_PIN_24
199 ARDUINO_PIN_24,
200#elif ARDUINO_PIN_LAST > 24
202#endif
203#ifdef ARDUINO_PIN_25
204 ARDUINO_PIN_25,
205#elif ARDUINO_PIN_LAST > 25
207#endif
208#ifdef ARDUINO_PIN_26
209 ARDUINO_PIN_26,
210#elif ARDUINO_PIN_LAST > 26
212#endif
213#ifdef ARDUINO_PIN_27
214 ARDUINO_PIN_27,
215#elif ARDUINO_PIN_LAST > 27
217#endif
218#ifdef ARDUINO_PIN_28
219 ARDUINO_PIN_28,
220#elif ARDUINO_PIN_LAST > 28
222#endif
223#ifdef ARDUINO_PIN_29
224 ARDUINO_PIN_29,
225#elif ARDUINO_PIN_LAST > 29
227#endif
228#ifdef ARDUINO_PIN_30
229 ARDUINO_PIN_30,
230#elif ARDUINO_PIN_LAST > 30
232#endif
233#ifdef ARDUINO_PIN_31
234 ARDUINO_PIN_31,
235#elif ARDUINO_PIN_LAST > 31
237#endif
238#ifdef ARDUINO_PIN_32
239 ARDUINO_PIN_32,
240#elif ARDUINO_PIN_LAST > 32
242#endif
243#ifdef ARDUINO_PIN_33
244 ARDUINO_PIN_33,
245#elif ARDUINO_PIN_LAST > 33
247#endif
248#ifdef ARDUINO_PIN_34
249 ARDUINO_PIN_34,
250#elif ARDUINO_PIN_LAST > 34
252#endif
253#ifdef ARDUINO_PIN_35
254 ARDUINO_PIN_35,
255#elif ARDUINO_PIN_LAST > 35
257#endif
258#ifdef ARDUINO_PIN_36
259 ARDUINO_PIN_36,
260#elif ARDUINO_PIN_LAST > 36
262#endif
263#ifdef ARDUINO_PIN_37
264 ARDUINO_PIN_37,
265#elif ARDUINO_PIN_LAST > 37
267#endif
268#ifdef ARDUINO_PIN_38
269 ARDUINO_PIN_38,
270#elif ARDUINO_PIN_LAST > 38
272#endif
273#ifdef ARDUINO_PIN_39
274 ARDUINO_PIN_39,
275#elif ARDUINO_PIN_LAST > 39
277#endif
278#ifdef ARDUINO_PIN_40
279 ARDUINO_PIN_40,
280#elif ARDUINO_PIN_LAST > 40
282#endif
283#ifdef ARDUINO_PIN_41
284 ARDUINO_PIN_41,
285#elif ARDUINO_PIN_LAST > 41
287#endif
288#ifdef ARDUINO_PIN_42
289 ARDUINO_PIN_42,
290#elif ARDUINO_PIN_LAST > 42
292#endif
293#ifdef ARDUINO_PIN_43
294 ARDUINO_PIN_43,
295#elif ARDUINO_PIN_LAST > 43
297#endif
298#ifdef ARDUINO_PIN_44
299 ARDUINO_PIN_44,
300#elif ARDUINO_PIN_LAST > 44
302#endif
303#ifdef ARDUINO_PIN_45
304 ARDUINO_PIN_45,
305#elif ARDUINO_PIN_LAST > 45
307#endif
308#ifdef ARDUINO_PIN_46
309 ARDUINO_PIN_46,
310#elif ARDUINO_PIN_LAST > 46
312#endif
313#ifdef ARDUINO_PIN_47
314 ARDUINO_PIN_47,
315#elif ARDUINO_PIN_LAST > 47
317#endif
318#ifdef ARDUINO_PIN_48
319 ARDUINO_PIN_48,
320#elif ARDUINO_PIN_LAST > 48
322#endif
323#ifdef ARDUINO_PIN_49
324 ARDUINO_PIN_49,
325#elif ARDUINO_PIN_LAST > 49
327#endif
328#ifdef ARDUINO_PIN_50
329 ARDUINO_PIN_50,
330#elif ARDUINO_PIN_LAST > 50
332#endif
333#ifdef ARDUINO_PIN_51
334 ARDUINO_PIN_51,
335#elif ARDUINO_PIN_LAST > 51
337#endif
338#ifdef ARDUINO_PIN_52
339 ARDUINO_PIN_52,
340#elif ARDUINO_PIN_LAST > 52
342#endif
343#ifdef ARDUINO_PIN_53
344 ARDUINO_PIN_53,
345#elif ARDUINO_PIN_LAST > 53
347#endif
348#ifdef ARDUINO_PIN_54
349 ARDUINO_PIN_54,
350#elif ARDUINO_PIN_LAST > 54
352#endif
353#ifdef ARDUINO_PIN_55
354 ARDUINO_PIN_55,
355#elif ARDUINO_PIN_LAST > 55
357#endif
358#ifdef ARDUINO_PIN_56
359 ARDUINO_PIN_56,
360#elif ARDUINO_PIN_LAST > 56
362#endif
363#ifdef ARDUINO_PIN_57
364 ARDUINO_PIN_57,
365#elif ARDUINO_PIN_LAST > 57
367#endif
368#ifdef ARDUINO_PIN_58
369 ARDUINO_PIN_58,
370#elif ARDUINO_PIN_LAST > 58
372#endif
373#ifdef ARDUINO_PIN_59
374 ARDUINO_PIN_59,
375#elif ARDUINO_PIN_LAST > 59
377#endif
378#ifdef ARDUINO_PIN_60
379 ARDUINO_PIN_60,
380#elif ARDUINO_PIN_LAST > 60
382#endif
383#ifdef ARDUINO_PIN_61
384 ARDUINO_PIN_61,
385#elif ARDUINO_PIN_LAST > 61
387#endif
388#ifdef ARDUINO_PIN_62
389 ARDUINO_PIN_62,
390#elif ARDUINO_PIN_LAST > 62
392#endif
393#ifdef ARDUINO_PIN_63
394 ARDUINO_PIN_63,
395#elif ARDUINO_PIN_LAST > 63
397#endif
398#ifdef ARDUINO_PIN_64
399 ARDUINO_PIN_64,
400#elif ARDUINO_PIN_LAST > 64
402#endif
403#ifdef ARDUINO_PIN_65
404 ARDUINO_PIN_65,
405#elif ARDUINO_PIN_LAST > 65
407#endif
408#ifdef ARDUINO_PIN_66
409 ARDUINO_PIN_66,
410#elif ARDUINO_PIN_LAST > 66
412#endif
413#ifdef ARDUINO_PIN_67
414 ARDUINO_PIN_67,
415#elif ARDUINO_PIN_LAST > 67
417#endif
418#ifdef ARDUINO_PIN_68
419 ARDUINO_PIN_68,
420#elif ARDUINO_PIN_LAST > 68
422#endif
423#ifdef ARDUINO_PIN_69
424 ARDUINO_PIN_69,
425#elif ARDUINO_PIN_LAST > 69
427#endif
428#endif /* DOXYGEN */
429};
430
431#ifdef __cplusplus
432}
433#endif
434
435#endif /* ARDUINO_BOARD_PINS_H */
static const gpio_t arduino_pinmap[]
Look-up table for the Arduino's digital pins:
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
Low-level GPIO peripheral driver interface definitions.