Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
arduino_iomap.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2022 Gunar Schorcht
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
17
18
#include "
periph/gpio.h
"
19
#include "
periph/adc.h
"
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
25
#define ARDUINO_UART_D0D1 UART_DEV(0)
26
#define ARDUINO_SPI_D11D12D13 SPI_DEV(0)
27
28
#ifdef MODULE_ESP32C3_WEMOS_MINI_V1_0_0
29
# define ARDUINO_LED (5)
30
#endif
31
36
#define ARDUINO_PIN_0 GPIO20
37
#define ARDUINO_PIN_1 GPIO21
38
#define ARDUINO_PIN_2 GPIO9
39
#define ARDUINO_PIN_3 GPIO6
40
41
#ifdef MODULE_ESP32C3_WEMOS_MINI_V1_0_0
42
43
# define ARDUINO_PIN_4 GPIO0
44
# define ARDUINO_PIN_5 GPIO1
45
# define ARDUINO_PIN_6 GPIO7
46
47
# define ARDUINO_PIN_10 GPIO5
48
# define ARDUINO_PIN_11 GPIO4
49
# define ARDUINO_PIN_12 GPIO3
50
# define ARDUINO_PIN_13 GPIO2
51
52
#else
/* MODULE_ESP32C3_WEMOS_MINI_V2_1_0 */
53
54
# define ARDUINO_PIN_4 GPIO7
55
# define ARDUINO_PIN_6 GPIO2
56
# define ARDUINO_PIN_7 GPIO3
57
58
# define ARDUINO_PIN_10 GPIO5
59
# define ARDUINO_PIN_11 GPIO4
60
# define ARDUINO_PIN_12 GPIO0
61
# define ARDUINO_PIN_13 GPIO1
62
63
#endif
64
65
/* Arduino pins 7 ... 9 are not available */
66
67
/* analog pins as digital pin: */
68
#define ARDUINO_PIN_14 GPIO0
69
#define ARDUINO_PIN_15 GPIO1
70
#define ARDUINO_PIN_16 GPIO2
71
#define ARDUINO_PIN_17 GPIO3
72
#define ARDUINO_PIN_18 GPIO4
73
#define ARDUINO_PIN_19 GPIO5
74
75
#define ARDUINO_PIN_LAST 19
77
82
#define ARDUINO_PIN_A0 ARDUINO_PIN_14
83
#define ARDUINO_PIN_A1 ARDUINO_PIN_15
84
#define ARDUINO_PIN_A2 ARDUINO_PIN_16
85
#define ARDUINO_PIN_A3 ARDUINO_PIN_17
86
#define ARDUINO_PIN_A4 ARDUINO_PIN_18
87
#define ARDUINO_PIN_A5 ARDUINO_PIN_19
89
94
#define ARDUINO_A0 ADC_LINE(0)
95
#define ARDUINO_A1 ADC_LINE(1)
96
#define ARDUINO_A2 ADC_LINE(2)
97
#define ARDUINO_A3 ADC_LINE(3)
98
#define ARDUINO_A4 ADC_LINE(4)
99
#define ARDUINO_A5 ADC_LINE(5)
100
101
#define ARDUINO_ANALOG_PIN_LAST 5
103
108
#define ARDUINO_PIN_3_PWM_DEV PWM_DEV(0)
109
#define ARDUINO_PIN_3_PWM_CHAN 1
110
111
#define ARDUINO_PIN_5_PWM_DEV PWM_DEV(0)
112
#define ARDUINO_PIN_5_PWM_CHAN 0
113
114
#define ARDUINO_PIN_6_PWM_DEV PWM_DEV(0)
115
#define ARDUINO_PIN_6_PWM_CHAN 2
117
118
#ifdef __cplusplus
119
}
120
#endif
121
adc.h
Low-level ADC peripheral driver interface definitions.
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Wed Aug 27 2025 20:40:39 by
1.13.2