mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-02 14:49:04 +00:00
refactor(rng): refactor to use hal/ll apis for c61
This commit is contained in:
@@ -723,6 +723,28 @@ static inline void adc_ll_enable_tout_bus(adc_unit_t adc_n, bool en)
|
||||
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_EN_TOUT_SAR1_BUS, en);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare regi2c SARADC registers
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void adc_ll_regi2c_adc_prepare(void)
|
||||
{
|
||||
adc_ll_set_dtest_param(0);
|
||||
adc_ll_set_ent_param(1);
|
||||
adc_ll_enable_tout_bus(ADC_UNIT_1, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset regi2c SARADC registers
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void adc_ll_regi2c_adc_reset(void)
|
||||
{
|
||||
adc_ll_set_dtest_param(0);
|
||||
adc_ll_set_ent_param(0);
|
||||
adc_ll_enable_tout_bus(ADC_UNIT_1, false);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
Oneshot Read
|
||||
---------------------------------------------------------------*/
|
||||
|
Reference in New Issue
Block a user