arduino_iomap.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2024 Christian Amsüss <chrysn@fsfe.org>
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include "periph/gpio.h"
20 #include "periph/adc.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
38 #define ARDUINO_PIN_0 GPIO_PIN(0, 11)
39 #define ARDUINO_PIN_1 GPIO_PIN(0, 12)
40 
41 #define ARDUINO_PIN_2 GPIO_PIN(0, 13)
42 #define ARDUINO_PIN_3 GPIO_PIN(0, 14)
43 #define ARDUINO_PIN_4 GPIO_PIN(0, 15)
44 #define ARDUINO_PIN_5 GPIO_PIN(0, 16)
45 
46 /* Those interact with LEDs, SWO and IOEXP_IRQ */
47 #define ARDUINO_PIN_6 GPIO_PIN(0, 17)
48 #define ARDUINO_PIN_7 GPIO_PIN(0, 18)
49 #define ARDUINO_PIN_8 GPIO_PIN(0, 19)
50 #define ARDUINO_PIN_9 GPIO_PIN(0, 20)
51 
52 #define ARDUINO_PIN_10 GPIO_PIN(0, 22)
53 #define ARDUINO_PIN_11 GPIO_PIN(0, 23)
54 #define ARDUINO_PIN_12 GPIO_PIN(0, 24)
55 #define ARDUINO_PIN_13 GPIO_PIN(0, 25)
56 #define ARDUINO_PIN_14 GPIO_PIN(0, 0)
57 #define ARDUINO_PIN_15 GPIO_PIN(0, 1)
58 /* Also RESET */
59 #define ARDUINO_PIN_16 GPIO_PIN(0, 21)
60 
61 /* These are also UART ports */
62 #define ARDUINO_PIN_17 GPIO_PIN(0, 5)
63 #define ARDUINO_PIN_18 GPIO_PIN(0, 6)
64 #define ARDUINO_PIN_19 GPIO_PIN(0, 7)
65 #define ARDUINO_PIN_20 GPIO_PIN(0, 8)
66 
67 #define ARDUINO_PIN_21 GPIO_PIN(0, 9)
68 #define ARDUINO_PIN_22 GPIO_PIN(0, 10)
69 
70 #define ARDUINO_PIN_LAST 22
77 #define ARDUINO_PIN_A0 GPIO_PIN(0, 3)
78 #define ARDUINO_PIN_A1 GPIO_PIN(0, 4)
79 #define ARDUINO_PIN_A2 GPIO_PIN(0, 28)
80 #define ARDUINO_PIN_A3 GPIO_PIN(0, 29)
81 #define ARDUINO_PIN_A4 GPIO_PIN(0, 30)
82 #define ARDUINO_PIN_A5 GPIO_PIN(0, 31)
92 #define ARDUINO_I2C_UNO I2C_DEV(0)
102 #define ARDUINO_SPI_D11D12D13 SPI_DEV(0)
105 #ifdef __cplusplus
106 }
107 #endif
108 
Low-level ADC peripheral driver interface definitions.
Low-level GPIO peripheral driver interface definitions.