From 8ed9f6406437de75d1e0dc294a7177f44513e5e0 Mon Sep 17 00:00:00 2001 From: Pavlo Hamov Date: Wed, 13 Oct 2021 09:18:23 +0300 Subject: [PATCH] samples: wdt: add esp32s2 support Add support of esp32s2_soala board Signed-off-by: Pavlo Hamov --- samples/drivers/watchdog/boards/esp32s2_saola.conf | 1 + samples/drivers/watchdog/boards/esp32s2_saola.overlay | 3 +++ samples/drivers/watchdog/src/main.c | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 samples/drivers/watchdog/boards/esp32s2_saola.conf create mode 100644 samples/drivers/watchdog/boards/esp32s2_saola.overlay diff --git a/samples/drivers/watchdog/boards/esp32s2_saola.conf b/samples/drivers/watchdog/boards/esp32s2_saola.conf new file mode 100644 index 0000000000..26d5270128 --- /dev/null +++ b/samples/drivers/watchdog/boards/esp32s2_saola.conf @@ -0,0 +1 @@ +CONFIG_HEAP_MEM_POOL_SIZE=256 diff --git a/samples/drivers/watchdog/boards/esp32s2_saola.overlay b/samples/drivers/watchdog/boards/esp32s2_saola.overlay new file mode 100644 index 0000000000..16eaecb679 --- /dev/null +++ b/samples/drivers/watchdog/boards/esp32s2_saola.overlay @@ -0,0 +1,3 @@ +&wdt0 { + status = "okay"; +}; diff --git a/samples/drivers/watchdog/src/main.c b/samples/drivers/watchdog/src/main.c index a7a8893a30..4a56f85e66 100644 --- a/samples/drivers/watchdog/src/main.c +++ b/samples/drivers/watchdog/src/main.c @@ -43,6 +43,8 @@ #define WDT_NODE DT_INST(0, microchip_xec_watchdog) #elif DT_HAS_COMPAT_STATUS_OKAY(ti_cc32xx_watchdog) #define WDT_NODE DT_INST(0, ti_cc32xx_watchdog) +#elif DT_HAS_COMPAT_STATUS_OKAY(espressif_esp32_watchdog) +#define WDT_NODE DT_INST(0, espressif_esp32_watchdog) #endif #ifndef WDT_ALLOW_CALLBACK