mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
feat(rtcio): support rtcio on esp32s31
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -89,7 +89,7 @@ static inline void rtcio_ll_iomux_func_sel(int rtcio_num, int func)
|
||||
LP_IOMUX.pad[rtcio_num].fun_sel = func;
|
||||
// When using as normal (output) LP_GPIO, it is reasonable to ensure that no peripheral signal is routed to the pin
|
||||
if (func == RTCIO_LL_PIN_FUNC) {
|
||||
LP_GPIO.func_out_sel_cfg[rtcio_num].func_out_sel = SIG_LP_GPIO_OUT_IDX;
|
||||
LP_GPIO.func_out_sel_cfg[rtcio_num].func_out_sel = LP_SIG_GPIO_OUT_IDX;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,11 +105,7 @@ static inline void _rtcio_ll_enable_io_clock(bool enable)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
#define rtcio_ll_enable_io_clock(...) do { \
|
||||
(void)__DECLARE_RCC_ATOMIC_ENV; \
|
||||
_rtcio_ll_enable_io_clock(__VA_ARGS__); \
|
||||
} while(0)
|
||||
#define rtcio_ll_enable_io_clock(...) _rtcio_ll_enable_io_clock(__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* @brief Select the lp_gpio/hp_gpio function to control the pad.
|
||||
@@ -153,7 +149,7 @@ static inline void rtcio_ll_output_disable(int rtcio_num)
|
||||
{
|
||||
LP_GPIO.enable_w1tc.val = BIT(rtcio_num);
|
||||
// Ensure no other output signal is routed via LP_GPIO matrix to this pin
|
||||
LP_GPIO.func_out_sel_cfg[rtcio_num].func_out_sel = SIG_LP_GPIO_OUT_IDX;
|
||||
LP_GPIO.func_out_sel_cfg[rtcio_num].func_out_sel = LP_SIG_GPIO_OUT_IDX;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user