Skip to content

Commit 034710b

Browse files
author
Raffael Rostagno
committed
drivers: gpio: esp32h2: Add support
Add gpio support for ESP32-H2. Signed-off-by: Raffael Rostagno <[email protected]>
1 parent ddf3291 commit 034710b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpio/gpio_esp32.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define DT_DRV_COMPAT espressif_esp32_gpio
99

1010
/* Include esp-idf headers first to avoid redefining BIT() macro */
11+
#include <stddef.h>
1112
#include <soc/gpio_reg.h>
1213
#include <soc/io_mux_reg.h>
1314
#include <soc/soc.h>
@@ -44,8 +45,8 @@ LOG_MODULE_REGISTER(gpio_esp32, CONFIG_LOG_DEFAULT_LEVEL);
4445
#define out_w1tc out_w1tc.val
4546
/* arch_curr_cpu() is not available for riscv based chips */
4647
#define ESP32_CPU_ID() 0
47-
#elif defined(CONFIG_SOC_SERIES_ESP32C6)
48-
/* gpio structs in esp32c6 are also different */
48+
#elif defined(CONFIG_SOC_SERIES_ESP32C6) || defined(CONFIG_SOC_SERIES_ESP32H2)
49+
/* gpio structs in esp32c6/h2 are also different */
4950
#define out out.out_data_orig
5051
#define in in.in_data_next
5152
#define out_w1ts out_w1ts.val

0 commit comments

Comments
 (0)