refactor(rng): use adc_ll apis for ESP32-h4 and refactor rng_ll_enable/disable

This commit is contained in:
gaoxu
2026-05-26 19:02:41 +08:00
parent ad310ce681
commit 43317018d1
38 changed files with 533 additions and 418 deletions
@@ -9,6 +9,7 @@
#include <stdint.h>
#include "soc/soc.h"
#include "soc/lpperi_reg.h"
#include "hal/lp_clkrst_ll.h"
#ifdef __cplusplus
extern "C" {
@@ -19,6 +20,16 @@ static inline uint32_t rng_ll_read_data(void)
return REG_READ(LPPERI_RNG_DATA_REG);
}
static inline void rng_ll_enable(void)
{
_lp_clkrst_ll_enable_rng_clock(true);
}
static inline void rng_ll_disable(void)
{
_lp_clkrst_ll_enable_rng_clock(false);
}
#ifdef __cplusplus
}
#endif