mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
feat(lp_adc): Added support for LP ADC initialization to the esp_adc oneshot driver
This commit adds support for LP ADC initialization to the esp_adc oneshot driver, when it is used from the HP core.
This commit is contained in:
@@ -18,8 +18,8 @@ static adc_ll_controller_t get_controller(adc_unit_t unit, adc_hal_work_mode_t w
|
||||
{
|
||||
if (unit == ADC_UNIT_1) {
|
||||
switch (work_mode) {
|
||||
#if SOC_ULP_HAS_ADC
|
||||
case ADC_HAL_ULP_FSM_MODE:
|
||||
#if SOC_ULP_HAS_ADC || SOC_LP_CORE_SUPPORT_LP_ADC
|
||||
case ADC_HAL_LP_MODE:
|
||||
return ADC_LL_CTRL_ULP;
|
||||
#endif
|
||||
case ADC_HAL_SINGLE_READ_MODE:
|
||||
@@ -35,8 +35,8 @@ static adc_ll_controller_t get_controller(adc_unit_t unit, adc_hal_work_mode_t w
|
||||
}
|
||||
} else {
|
||||
switch (work_mode) {
|
||||
#if SOC_ULP_HAS_ADC
|
||||
case ADC_HAL_ULP_FSM_MODE:
|
||||
#if SOC_ULP_HAS_ADC || SOC_LP_CORE_SUPPORT_LP_ADC
|
||||
case ADC_HAL_LP_MODE:
|
||||
return ADC_LL_CTRL_ULP;
|
||||
#endif
|
||||
#if !SOC_ADC_ARBITER_SUPPORTED //No ADC2 arbiter on ESP32
|
||||
|
Reference in New Issue
Block a user