Merge branch 'refactor/improve_the_compatible_method_on_h2_v5.3' into 'release/v5.3'

refactor(lpperi): improve compatibility solution (v5.3)

See merge request espressif/esp-idf!36421
This commit is contained in:
morris
2025-01-17 12:40:00 +08:00
10 changed files with 25 additions and 93 deletions
@@ -63,7 +63,7 @@ static inline void lp_clkrst_ll_select_modem_32k_clock_source(lp_clkrst_dev_t *h
__attribute__((always_inline))
static inline void _lp_clkrst_ll_enable_rng_clock(bool en)
{
LPPERI.clk_en->rng_ck_en = en;
LPPERI_REG_SET(clk_en.rng_ck_en, en);
}
/// LPPERI.clk_en is a shared register, so this function must be used in an atomic way
@@ -38,8 +38,8 @@ typedef enum {
*/
static inline void _rtcio_ll_enable_io_clock(bool enable)
{
LPPERI.clk_en->lp_io_ck_en = enable;
while (LPPERI.clk_en->lp_io_ck_en != enable) {
LPPERI_REG_SET(clk_en.lp_io_ck_en, enable);
while (LPPERI_REG_GET(clk_en.lp_io_ck_en) != enable) {
;
}
}