File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
tests/drivers/gpio/gpio_basic_api/socs Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 20
20
#include <zephyr/device.h>
21
21
#include <zephyr/drivers/gpio.h>
22
22
#include <zephyr/dt-bindings/gpio/espressif-esp32-gpio.h>
23
- #if defined(CONFIG_SOC_SERIES_ESP32C3 ) || defined(CONFIG_SOC_SERIES_ESP32C6 )
23
+ #if defined(CONFIG_SOC_SERIES_ESP32C2 ) || \
24
+ defined(CONFIG_SOC_SERIES_ESP32C3 ) || \
25
+ defined(CONFIG_SOC_SERIES_ESP32C6 )
24
26
#include <zephyr/drivers/interrupt_controller/intc_esp32c3.h>
25
27
#else
26
28
#include <zephyr/drivers/interrupt_controller/intc_esp32.h>
33
35
#include <zephyr/logging/log.h>
34
36
LOG_MODULE_REGISTER (gpio_esp32 , CONFIG_LOG_DEFAULT_LEVEL );
35
37
36
- #ifdef CONFIG_SOC_SERIES_ESP32C3
38
+ #ifdef CONFIG_SOC_SERIES_ESP32C2
39
+ #define out out.val
40
+ #define in in.val
41
+ #define out_w1ts out_w1ts.val
42
+ #define out_w1tc out_w1tc.val
43
+ /* arch_curr_cpu() is not available for riscv based chips */
44
+ #define CPU_ID () 0
45
+ #define ISR_HANDLER isr_handler_t
46
+ #elif CONFIG_SOC_SERIES_ESP32C3
37
47
/* gpio structs in esp32c3 series are different from xtensa ones */
38
48
#define out out.data
39
49
#define in in.data
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ / {
8
+ resources {
9
+ compatible = "test-gpio-basic-api";
10
+ out-gpios = <&gpio0 2 0>;
11
+ in-gpios = <&gpio0 3 0>;
12
+ };
13
+ };
You can’t perform that action at this time.
0 commit comments