mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-22 10:19:34 +01:00
refactor(rng): refactor to use hal/ll apis for c61
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_log.h"
|
||||
#include "bootloader_random.h"
|
||||
#include "hal/regi2c_ctrl_ll.h"
|
||||
#include "hal/adc_ll.h"
|
||||
@@ -23,9 +22,7 @@ void bootloader_random_enable(void)
|
||||
// enable analog i2c master clock for RNG runtime
|
||||
ANALOG_CLOCK_ENABLE();
|
||||
|
||||
adc_ll_set_dtest_param(0);
|
||||
adc_ll_set_ent_param(1);
|
||||
adc_ll_enable_tout_bus(ADC_UNIT_1, true);
|
||||
adc_ll_regi2c_adc_prepare(void);
|
||||
adc_ll_set_calibration_param(ADC_UNIT_1, 0x866);
|
||||
adc_ll_set_calibration_param(ADC_UNIT_2, 0x866);
|
||||
|
||||
@@ -49,9 +46,7 @@ void bootloader_random_disable(void)
|
||||
adc_ll_digi_reset_pattern_table();
|
||||
adc_ll_set_calibration_param(ADC_UNIT_1, 0x0);
|
||||
adc_ll_set_calibration_param(ADC_UNIT_2, 0x0);
|
||||
adc_ll_set_dtest_param(0);
|
||||
adc_ll_set_ent_param(0);
|
||||
adc_ll_enable_tout_bus(ADC_UNIT_1, false);
|
||||
adc_ll_regi2c_adc_reset();
|
||||
|
||||
// disable analog i2c master clock
|
||||
ANALOG_CLOCK_DISABLE();
|
||||
|
||||
Reference in New Issue
Block a user