Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
arduino_iomap.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2023 Otto-von-Guericke-Universität Magdeburg
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
21
#include "
periph/gpio.h
"
22
#include "
periph/adc.h
"
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
35
/* D11/D12/D13 are on P0.25, P0.28, P0.29 */
36
#define ARDUINO_SPI_D11D12D13 SPI_DEV(0)
37
/* The ISP SPI bus is also connected to P0.25, P0.28, P0.29 */
38
#define ARDUINO_SPI_ISP SPI_DEV(0)
49
#define ARDUINO_I2C_UNO I2C_DEV(0)
56
/* P3 header on the nRF51DK */
57
#define ARDUINO_PIN_0 GPIO_PIN(0, 12)
58
#define ARDUINO_PIN_1 GPIO_PIN(0, 13)
59
#define ARDUINO_PIN_2 GPIO_PIN(0, 14)
60
#define ARDUINO_PIN_3 GPIO_PIN(0, 15)
61
#define ARDUINO_PIN_4 GPIO_PIN(0, 16)
62
#define ARDUINO_PIN_5 GPIO_PIN(0, 17)
63
#define ARDUINO_PIN_6 GPIO_PIN(0, 18)
64
#define ARDUINO_PIN_7 GPIO_PIN(0, 19)
65
66
/* P4 header on the nRF51DK */
67
#define ARDUINO_PIN_8 GPIO_PIN(0, 20)
68
#define ARDUINO_PIN_9 GPIO_PIN(0, 23)
69
#define ARDUINO_PIN_10 GPIO_PIN(0, 24)
70
#define ARDUINO_PIN_11 GPIO_PIN(0, 25)
71
#define ARDUINO_PIN_12 GPIO_PIN(0, 28)
72
#define ARDUINO_PIN_13 GPIO_PIN(0, 29)
73
/* SCL and SDA on this header are not available as digital pins in the
74
* Arduino world. It is P0.30 and P0.07 here, though. Also what would be
75
* AREF in the Arduino world is P0.00 here */
76
77
/* P2 header on the nRF51DK */
78
#define ARDUINO_PIN_14 GPIO_PIN(0, 1)
79
#define ARDUINO_PIN_15 GPIO_PIN(0, 2)
80
#define ARDUINO_PIN_16 GPIO_PIN(0, 3)
81
#define ARDUINO_PIN_17 GPIO_PIN(0, 4)
82
#define ARDUINO_PIN_18 GPIO_PIN(0, 5)
83
#define ARDUINO_PIN_19 GPIO_PIN(0, 6)
84
85
#define ARDUINO_PIN_LAST 19
92
#define ARDUINO_PIN_A0 ARDUINO_PIN_14
93
#define ARDUINO_PIN_A1 ARDUINO_PIN_15
94
#define ARDUINO_PIN_A2 ARDUINO_PIN_16
95
#define ARDUINO_PIN_A3 ARDUINO_PIN_17
96
#define ARDUINO_PIN_A4 ARDUINO_PIN_18
97
#define ARDUINO_PIN_A5 ARDUINO_PIN_19
104
#define ARDUINO_A0 ADC_LINE(0)
105
#define ARDUINO_A1 ADC_LINE(1)
106
#define ARDUINO_A2 ADC_LINE(2)
107
#define ARDUINO_A3 ADC_LINE(3)
108
#define ARDUINO_A4 ADC_LINE(4)
109
#define ARDUINO_A5 ADC_LINE(5)
110
111
#define ARDUINO_ANALOG_PIN_LAST 5
114
#ifdef __cplusplus
115
}
116
#endif
117
adc.h
Low-level ADC peripheral driver interface definitions.
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Sat Sep 6 2025 20:14:01 by
1.9.1