mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-18 07:37:54 +00:00
Merge branch 'refactor/rtcio_caps_responsibility' into 'master'
refactor(driver/rtcio): Re-wrap RTCIO APIs with more accurate soc_caps Closes IDF-7406 See merge request espressif/esp-idf!24522
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -18,16 +18,18 @@
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
|
||||
#if SOC_RTCIO_PIN_COUNT > 0
|
||||
#include "hal/rtc_io_ll.h"
|
||||
#if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
|
||||
#include "hal/rtc_io_types.h"
|
||||
#endif
|
||||
#endif //SOC_RTCIO_PIN_COUNT > 0
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
|
||||
#if SOC_RTCIO_PIN_COUNT > 0
|
||||
/**
|
||||
* Select the rtcio function.
|
||||
*
|
||||
@@ -37,6 +39,7 @@ extern "C" {
|
||||
*/
|
||||
#define rtcio_hal_function_select(rtcio_num, func) rtcio_ll_function_select(rtcio_num, func)
|
||||
|
||||
#if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
|
||||
/**
|
||||
* Enable rtcio output.
|
||||
*
|
||||
@@ -243,7 +246,7 @@ void rtcio_hal_set_direction_in_sleep(int rtcio_num, rtc_gpio_mode_t mode);
|
||||
|
||||
#endif
|
||||
|
||||
#if SOC_RTCIO_HOLD_SUPPORTED || SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
|
||||
#if SOC_RTCIO_HOLD_SUPPORTED && SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
|
||||
|
||||
/**
|
||||
* Helper function to disconnect internal circuits from an RTC IO
|
||||
@@ -262,6 +265,8 @@ void rtcio_hal_isolate(int rtc_num);
|
||||
|
||||
#endif
|
||||
|
||||
#endif //SOC_RTCIO_PIN_COUNT > 0
|
||||
|
||||
#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0)
|
||||
|
||||
#define gpio_hal_deepsleep_wakeup_enable(hal, gpio_num, intr_type) rtcio_hal_wakeup_enable(gpio_num, intr_type)
|
||||
@@ -291,7 +296,8 @@ void rtcio_hal_isolate(int rtc_num);
|
||||
*/
|
||||
#define rtcio_hal_clear_interrupt_status() rtcio_ll_clear_interrupt_status()
|
||||
|
||||
#endif //SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
|
||||
#endif //SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user