1+ /*
2+ * Copyright (c) 2022 Dhruva Gole
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ /* All the pins that are 100 + x are gpio1 pins and < 100 are in gpio0 */
8+ #pragma once
9+ #include <zephyr/drivers/gpio.h>
10+ #include <zephyr/zephyr.h>
11+
12+ #define LED_BUILTIN 7
13+
14+ static struct gpio_dt_spec d0 =
15+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d0_gpios );
16+ static struct gpio_dt_spec d1 =
17+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d1_gpios );
18+ static struct gpio_dt_spec d2 =
19+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d2_gpios );
20+ static struct gpio_dt_spec d3 =
21+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d3_gpios );
22+ static struct gpio_dt_spec d4 =
23+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d4_gpios );
24+ static struct gpio_dt_spec d5 =
25+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d5_gpios );
26+ static struct gpio_dt_spec d6 =
27+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d6_gpios );
28+ static struct gpio_dt_spec d7 =
29+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d7_gpios );
30+ static struct gpio_dt_spec d8 =
31+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d8_gpios );
32+ static struct gpio_dt_spec d9 =
33+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d9_gpios );
34+ static struct gpio_dt_spec d10 =
35+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d10_gpios );
36+ static struct gpio_dt_spec d11 =
37+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d11_gpios );
38+ static struct gpio_dt_spec d12 =
39+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d12_gpios );
40+ static struct gpio_dt_spec d13 =
41+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d13_gpios );
42+ static struct gpio_dt_spec d14 =
43+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d13_gpios );
44+ static struct gpio_dt_spec d15 =
45+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d15_gpios );
46+ static struct gpio_dt_spec d16 =
47+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d16_gpios );
48+ static struct gpio_dt_spec d17 =
49+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d17_gpios );
50+ static struct gpio_dt_spec d18 =
51+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d18_gpios );
52+ static struct gpio_dt_spec d19 =
53+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d19_gpios );
54+ static struct gpio_dt_spec d20 =
55+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d20_gpios );
56+ static struct gpio_dt_spec d21 =
57+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d21_gpios );
58+
59+ static struct gpio_dt_spec * arduino_pins [22 ] = {
60+ & d0 , & d1 , & d2 , & d3 , & d4 , & d5 , & d6 , & d7 , & d8 , & d9 , & d10 ,
61+ & d11 , & d12 , & d13 , & d14 , & d15 , & d16 , & d17 , & d18 , & d19 , & d20 , & d21 };
62+
63+ enum digitalPins {
64+ D0 ,
65+ D1 ,
66+ D2 ,
67+ D3 ,
68+ D4 ,
69+ D5 ,
70+ D6 ,
71+ D7 ,
72+ D8 ,
73+ D9 ,
74+ D10 ,
75+ D11 ,
76+ D12 ,
77+ D13 ,
78+ D14 ,
79+ D15 ,
80+ D16 ,
81+ D17 ,
82+ D18 ,
83+ D19 ,
84+ D20 ,
85+ D21
86+ };
0 commit comments