mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-01 22:38:30 +00:00
refactor(rng): refactor to use hal/ll apis for S3
This commit is contained in:
@@ -10,7 +10,10 @@
|
||||
#include "hal/adc_types.h"
|
||||
#include "esp_private/regi2c_ctrl.h"
|
||||
|
||||
#define I2C_SAR_ADC_INIT_CODE_VAL 2150
|
||||
#define I2C_SAR_ADC_INIT_CODE_VAL 2150
|
||||
#define ADC_RNG_CLKM_DIV_NUM 0
|
||||
#define ADC_RNG_CLKM_DIV_B 0
|
||||
#define ADC_RNG_CLKM_DIV_A 0
|
||||
|
||||
void bootloader_random_enable(void)
|
||||
{
|
||||
@@ -18,7 +21,7 @@ void bootloader_random_enable(void)
|
||||
adc_ll_enable_bus_clock(true);
|
||||
adc_ll_enable_func_clock(true);
|
||||
adc_ll_digi_clk_sel(ADC_DIGI_CLK_SRC_XTAL);
|
||||
adc_ll_digi_controller_clk_div(0, 0, 0);
|
||||
adc_ll_digi_controller_clk_div(ADC_RNG_CLKM_DIV_NUM, ADC_RNG_CLKM_DIV_B, ADC_RNG_CLKM_DIV_A);
|
||||
|
||||
// some ADC sensor registers are in power group PERIF_I2C and need to be enabled via PMU
|
||||
#ifndef BOOTLOADER_BUILD
|
||||
|
Reference in New Issue
Block a user