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 13
13+
14+ static struct gpio_dt_spec d0 = GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d0_gpios );
15+ static struct gpio_dt_spec d1 = GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d1_gpios );
16+ static struct gpio_dt_spec d2 = GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d2_gpios );
17+ static struct gpio_dt_spec d3 = GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d3_gpios );
18+ static struct gpio_dt_spec d4 =
19+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d4_gpios );
20+ static struct gpio_dt_spec d5 =
21+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d5_gpios );
22+ static struct gpio_dt_spec d6 =
23+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d6_gpios );
24+ static struct gpio_dt_spec d7 =
25+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d7_gpios );
26+ static struct gpio_dt_spec d8 =
27+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d8_gpios );
28+ static struct gpio_dt_spec d9 =
29+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d9_gpios );
30+ static struct gpio_dt_spec d10 =
31+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d10_gpios );
32+ static struct gpio_dt_spec d11 =
33+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d11_gpios );
34+ static struct gpio_dt_spec d12 =
35+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d12_gpios );
36+ static struct gpio_dt_spec d13 =
37+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d13_gpios );
38+ static struct gpio_dt_spec d14 =
39+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d13_gpios );
40+ static struct gpio_dt_spec d15 =
41+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d15_gpios );
42+ static struct gpio_dt_spec d16 =
43+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d16_gpios );
44+ static struct gpio_dt_spec d17 =
45+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d17_gpios );
46+ static struct gpio_dt_spec d18 =
47+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d18_gpios );
48+ static struct gpio_dt_spec d19 =
49+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d19_gpios );
50+ static struct gpio_dt_spec d20 =
51+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d20_gpios );
52+ static struct gpio_dt_spec d21 =
53+ GPIO_DT_SPEC_GET (DT_PATH (zephyr_user ), d21_gpios );
54+
55+ static struct gpio_dt_spec * arduino_pins [22 ] = {
56+ & d0 , & d1 , & d2 , & d3 , & d4 , & d5 , & d6 , & d7 , & d8 , & d9 , & d10 ,
57+ & d11 , & d12 , & d13 , & d14 , & d15 , & d16 , & d17 , & d18 , & d19 , & d20 , & d21 };
58+
59+ enum digitalPins {
60+ D0 ,
61+ D1 ,
62+ D2 ,
63+ D3 ,
64+ D4 ,
65+ D5 ,
66+ D6 ,
67+ D7 ,
68+ D8 ,
69+ D9 ,
70+ D10 ,
71+ D11 ,
72+ D12 ,
73+ D13 ,
74+ D14 ,
75+ D15 ,
76+ D16 ,
77+ D17 ,
78+ D18 ,
79+ D19 ,
80+ D20 ,
81+ D21
82+ };
0 commit comments