mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor(rng): use adc_ll apis for ESP32-h4 and refactor rng_ll_enable/disable
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user