From 4c3fa95c946c666db04ad808a1a79d699b7aa73f Mon Sep 17 00:00:00 2001 From: X-Ryl669 Date: Wed, 23 Apr 2025 11:25:30 +0200 Subject: [PATCH] fix(ulp): Add missing wake up enable and disable functions for LP core This commit adds wrapper APIs to enable and disable LP IO as a wakeup source for the LP Core. Merges https://github.com/espressif/esp-idf/pull/15837 --- .../lp_core/include/ulp_lp_core_gpio.h | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/components/ulp/lp_core/lp_core/include/ulp_lp_core_gpio.h b/components/ulp/lp_core/lp_core/include/ulp_lp_core_gpio.h index b2db02e262..57dd63fedc 100644 --- a/components/ulp/lp_core/lp_core/include/ulp_lp_core_gpio.h +++ b/components/ulp/lp_core/lp_core/include/ulp_lp_core_gpio.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -200,6 +200,27 @@ static inline void ulp_lp_core_gpio_clear_intr_status(void) rtcio_ll_clear_interrupt_status(); } +/** + * @brief Enable wake up for lp io pin + * + * @param lp_io_num The lp io pin to enable the wake up for + * @param intr_type The interrupt type to enable wake up for + */ +static inline void ulp_lp_core_gpio_wakeup_enable(lp_io_num_t lp_io_num, gpio_int_type_t intr_type) +{ + rtcio_ll_wakeup_enable(lp_io_num, intr_type); +} + +/** + * @brief Disable wake up for lp io pin + * + * @param lp_io_num The lp io pin to disable the wake up for + */ +static inline void ulp_lp_core_gpio_wakeup_disable(lp_io_num_t lp_io_num) +{ + rtcio_ll_wakeup_disable(lp_io_num); +} + #ifdef __cplusplus } #endif