feat(esp_hw_support): support lp uart wakeup during sleep v6.0

This commit is contained in:
hebinglin
2025-11-06 19:25:20 +08:00
parent b45631a7af
commit b113517e70
13 changed files with 237 additions and 29 deletions
@@ -121,6 +121,21 @@ FORCE_INLINE_ATTR void _clk_gate_ll_xtal_to_lp_periph_en(bool enable)
_clk_gate_ll_xtal_to_lp_periph_en(__VA_ARGS__); \
} while(0)
/**
* Enable or disable the clock gate for rtc fast to lp periph
* @param enable Enable / disable
*/
FORCE_INLINE_ATTR void _clk_gate_ll_rtc_fast_to_lp_periph_en(bool enable)
{
LP_AON_CLKRST.lp_clk_en.fosc_clk_force_on = enable;
}
/// use a macro to wrap the function, force the caller to use it in a critical section
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
#define clk_gate_ll_rtc_fast_to_lp_periph_en(...) do { \
(void)__DECLARE_RCC_ATOMIC_ENV; \
_clk_gate_ll_rtc_fast_to_lp_periph_en(__VA_ARGS__); \
} while(0)
/**
* Enable or disable the clock gate for ref_50m.
* @param enable Enable / disable