11/*
2- * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
2+ * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 */
1919#include "soc/lp_iomux_struct.h"
2020#include "soc/lp_gpio_sig_map.h"
2121#include "soc/pmu_struct.h"
22+ #include "hal/gpio_types.h"
2223#include "hal/misc.h"
2324#include "hal/assert.h"
2425
@@ -33,21 +34,6 @@ typedef enum {
3334 RTCIO_LL_FUNC_DIGITAL = 0x1 , /*!< The pin controlled by DIGITAL module. */
3435} rtcio_ll_func_t ;
3536
36- typedef enum {
37- RTCIO_LL_WAKEUP_DISABLE = 0 , /*!< Disable GPIO interrupt */
38- RTCIO_LL_WAKEUP_LOW_LEVEL = 0x4 , /*!< GPIO interrupt type : input low level trigger */
39- RTCIO_LL_WAKEUP_HIGH_LEVEL = 0x5 , /*!< GPIO interrupt type : input high level trigger */
40- } rtcio_ll_wake_type_t ;
41-
42- typedef enum {
43- RTCIO_INTR_DISABLE = 0 , /*!< Disable GPIO interrupt */
44- RTCIO_INTR_POSEDGE = 1 , /*!< GPIO interrupt type : rising edge */
45- RTCIO_INTR_NEGEDGE = 2 , /*!< GPIO interrupt type : falling edge */
46- RTCIO_INTR_ANYEDGE = 3 , /*!< GPIO interrupt type : both rising and falling edge */
47- RTCIO_INTR_LOW_LEVEL = 4 , /*!< GPIO interrupt type : input low level trigger */
48- RTCIO_INTR_HIGH_LEVEL = 5 , /*!< GPIO interrupt type : input high level trigger */
49- } rtcio_ll_intr_type_t ;
50-
5137typedef enum {
5238 RTCIO_LL_OUTPUT_NORMAL = 0 , /*!< RTCIO output mode is normal. */
5339 RTCIO_LL_OUTPUT_OD = 0x1 , /*!< RTCIO output mode is open-drain. */
@@ -370,7 +356,7 @@ static inline void rtcio_ll_force_unhold_all(void)
370356 * @param rtcio_num The index of rtcio. 0 ~ MAX(rtcio).
371357 * @param type Wakeup on high level or low level.
372358 */
373- static inline void rtcio_ll_wakeup_enable (int rtcio_num , rtcio_ll_wake_type_t type )
359+ static inline void rtcio_ll_wakeup_enable (int rtcio_num , gpio_int_type_t type )
374360{
375361 LP_GPIO .pin [rtcio_num ].wakeup_enable = 1 ;
376362 LP_GPIO .pin [rtcio_num ].int_type = type ;
@@ -384,7 +370,7 @@ static inline void rtcio_ll_wakeup_enable(int rtcio_num, rtcio_ll_wake_type_t ty
384370static inline void rtcio_ll_wakeup_disable (int rtcio_num )
385371{
386372 LP_GPIO .pin [rtcio_num ].wakeup_enable = 0 ;
387- LP_GPIO .pin [rtcio_num ].int_type = RTCIO_LL_WAKEUP_DISABLE ;
373+ LP_GPIO .pin [rtcio_num ].int_type = 0 ;
388374}
389375
390376/**
@@ -393,7 +379,7 @@ static inline void rtcio_ll_wakeup_disable(int rtcio_num)
393379 * @param rtcio_num The index of rtcio. 0 ~ MAX(rtcio).
394380 * @param type Interrupt type on high level or low level.
395381 */
396- static inline void rtcio_ll_intr_enable (int rtcio_num , rtcio_ll_intr_type_t type )
382+ static inline void rtcio_ll_intr_enable (int rtcio_num , gpio_int_type_t type )
397383{
398384 LP_GPIO .pin [rtcio_num ].int_type = type ;
399385}
0 commit comments