refactor(lpperi): compatible refactor for H2 ECO5

This commit is contained in:
laokaiyao
2025-01-08 16:54:57 +08:00
parent c6637ae369
commit 25f64d9cbd
11 changed files with 538 additions and 51 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -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.clk_en->rng_ck_en = en;
}
/// LPPERI.clk_en is a shared register, so this function must be used in an atomic way

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -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.clk_en->lp_io_ck_en = enable;
while (LPPERI.clk_en->lp_io_ck_en != enable) {
;
}
}