arduino_iomap.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Gunar Schorcht
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 
9 #pragma once
10 
24 #include "periph/gpio.h"
25 #include "periph/adc.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #define ARDUINO_PIN_0 GPIO_PIN(1, 1)
36 #define ARDUINO_PIN_1 GPIO_PIN(1, 2)
37 #define ARDUINO_PIN_2 GPIO_PIN(1, 3)
38 #define ARDUINO_PIN_3 GPIO_PIN(1, 4)
39 #define ARDUINO_PIN_4 GPIO_PIN(1, 5)
40 #define ARDUINO_PIN_5 GPIO_PIN(1, 6)
41 #define ARDUINO_PIN_6 GPIO_PIN(1, 7)
42 #define ARDUINO_PIN_7 GPIO_PIN(1, 8)
43 #define ARDUINO_PIN_8 GPIO_PIN(1, 10)
44 #define ARDUINO_PIN_9 GPIO_PIN(1, 11)
45 #define ARDUINO_PIN_10 GPIO_PIN(1, 12)
46 #define ARDUINO_PIN_11 GPIO_PIN(1, 13)
47 #define ARDUINO_PIN_12 GPIO_PIN(1, 14)
48 #define ARDUINO_PIN_13 GPIO_PIN(1, 15)
49 #define ARDUINO_PIN_14 GPIO_PIN(0, 3)
50 #define ARDUINO_PIN_15 GPIO_PIN(0, 4)
51 #define ARDUINO_PIN_16 GPIO_PIN(0, 28)
52 #define ARDUINO_PIN_17 GPIO_PIN(0, 29)
53 #define ARDUINO_PIN_18 GPIO_PIN(0, 30)
54 #define ARDUINO_PIN_19 GPIO_PIN(0, 31)
55 #define ARDUINO_PIN_20 GPIO_PIN(0, 13)
56 #define ARDUINO_PIN_21 GPIO_PIN(0, 14)
57 #define ARDUINO_PIN_22 GPIO_PIN(1, 9)
58 #define ARDUINO_PIN_23 GPIO_PIN(0, 16)
59 
60 #define ARDUINO_PIN_LAST 23
67 #define ARDUINO_PIN_A0 ARDUINO_PIN_14
68 #define ARDUINO_PIN_A1 ARDUINO_PIN_15
69 #define ARDUINO_PIN_A2 ARDUINO_PIN_16
70 #define ARDUINO_PIN_A3 ARDUINO_PIN_17
71 #define ARDUINO_PIN_A4 ARDUINO_PIN_18
72 #define ARDUINO_PIN_A5 ARDUINO_PIN_19
79 #define ARDUINO_A0 ADC_LINE(1)
80 #define ARDUINO_A1 ADC_LINE(2)
81 #define ARDUINO_A2 ADC_LINE(4)
82 #define ARDUINO_A3 ADC_LINE(5)
83 #define ARDUINO_A4 ADC_LINE(6)
84 #define ARDUINO_A5 ADC_LINE(7)
85 
86 #define ARDUINO_ANALOG_PIN_LAST 5
96 #define ARDUINO_PWM_FREQU (15625U)
97 
98 #define ARDUINO_PIN_3_PWM_DEV PWM_DEV(0)
99 #define ARDUINO_PIN_3_PWM_CHAN 0
100 
101 #define ARDUINO_PIN_5_PWM_DEV PWM_DEV(0)
102 #define ARDUINO_PIN_5_PWM_CHAN 1
103 
104 #define ARDUINO_PIN_6_PWM_DEV PWM_DEV(0)
105 #define ARDUINO_PIN_6_PWM_CHAN 2
106 
107 #define ARDUINO_PIN_9_PWM_DEV PWM_DEV(0)
108 #define ARDUINO_PIN_9_PWM_CHAN 3
109 
110 #define ARDUINO_PIN_20_PWM_DEV PWM_DEV(1)
111 #define ARDUINO_PIN_20_PWM_CHAN 0
112 
113 #define ARDUINO_PIN_21_PWM_DEV PWM_DEV(1)
114 #define ARDUINO_PIN_21_PWM_CHAN 1
115 
116 #define ARDUINO_PIN_22_PWM_DEV PWM_DEV(1)
117 #define ARDUINO_PIN_22_PWM_CHAN 2
118 
119 #define ARDUINO_PIN_23_PWM_DEV PWM_DEV(1)
120 #define ARDUINO_PIN_23_PWM_CHAN 3
123 #ifdef __cplusplus
124 }
125 #endif
126 
Low-level ADC peripheral driver interface definitions.
Low-level GPIO peripheral driver interface definitions.