From b06bc22f1d0346d92de19087a8eea8d120fb19d5 Mon Sep 17 00:00:00 2001 From: Rohan Sahay Date: Tue, 15 Oct 2024 07:43:37 -0500 Subject: [PATCH] Adds the BTN0 wakeup source for SiWx917 (#233) Adds the BTN0 wakeup source --- .../autogen/sl_si91x_power_manager_wakeup_handler.c | 7 ++++++- .../autogen/sl_si91x_power_manager_wakeup_handler.h | 7 +++---- .../config/sl_si91x_power_manager_wakeup_source_config.h | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.c b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.c index fa91ca86a5..b75675c5f0 100644 --- a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.c +++ b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.c @@ -31,7 +31,12 @@ sl_status_t sl_si91x_power_manager_wakeup_init(void) { - sl_status_t status=SL_STATUS_OK; + sl_status_t status = SL_STATUS_OK; + + status = sli_si91x_power_manager_gpio_init(); + if (status != SL_STATUS_OK) { + return status; + } return status; } \ No newline at end of file diff --git a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.h b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.h index 86b7c5d4dc..416492cdbc 100644 --- a/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.h +++ b/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.h @@ -1,4 +1,4 @@ -/***************************************************************************//** +/***************************************************************************/ /** * @file sl_si91x_power_manager_wakeup_handler.h.jinja * @brief Power Manager Service Wakeup Handler APIs ******************************************************************************* @@ -32,13 +32,12 @@ #include "sl_status.h" - +#include "sl_si91x_driver_gpio.h" #include "sl_si91x_power_manager_wakeup_source_config.h" - sl_status_t sl_si91x_power_manager_wakeup_init(void); - +sl_status_t sli_si91x_power_manager_gpio_init(void); #endif // SL_SI91X_POWER_MANAGER_WAKEUP_HANDLER_H \ No newline at end of file diff --git a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_power_manager_wakeup_source_config.h b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_power_manager_wakeup_source_config.h index 43838bf786..1fb5bed4ac 100644 --- a/matter/si91x/siwx917/BRD4338A/config/sl_si91x_power_manager_wakeup_source_config.h +++ b/matter/si91x/siwx917/BRD4338A/config/sl_si91x_power_manager_wakeup_source_config.h @@ -59,7 +59,7 @@ extern "C" { // // GPIO Wakeup -#define SL_ENABLE_GPIO_WAKEUP_SOURCE 0 +#define SL_ENABLE_GPIO_WAKEUP_SOURCE 1 // Enable NPSS GPIO 0 // Default: 0 @@ -71,7 +71,7 @@ extern "C" { // Enable NPSS GPIO 2 // Default: 0 -#define ENABLE_NPSS_GPIO_2 0 +#define ENABLE_NPSS_GPIO_2 1 // Enable NPSS GPIO 3 // Default: 0