esp_adc: add adc ulp mode disable enum

Prior to this commit, adc ulp is disabled by setting
adc_oneshot_unit_init_cfg_t::ulp_mode to false.

After this commit, a new enum `ADC_ULP_MODE_DISABLE` is added. So
setting `ulp_mode` to `ADC_ULP_MODE_DISABLE`, instead of `false`, to
disable the ulp mode.
This commit is contained in:
Armando
2022-08-22 11:00:10 +08:00
parent e80d4c8f76
commit 5e31d4bb2b
7 changed files with 12 additions and 11 deletions
@@ -62,7 +62,7 @@ Create an ADC Unit Handle under Normal Oneshot Mode
adc_oneshot_unit_handle_t adc1_handle;
adc_oneshot_unit_init_cfg_t init_config1 = {
.unit_id = ADC_UNIT_1,
.ulp_mode = false,
.ulp_mode = ADC_ULP_MODE_DISABLE,
};
ESP_ERROR_CHECK(adc_oneshot_new_unit(&init_config1, &adc1_handle));