From e1ef3f74516e707e3509f2e5a7badd0b273948a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Mon, 5 Aug 2024 15:04:16 +0200 Subject: [PATCH] adc_oneshot_chan_cfg_t config: Fix attributes order in example to match the declaration Closes https://github.com/espressif/esp-idf/pull/14304 Closes https://github.com/espressif/esp-idf/issues/14303 --- examples/peripherals/adc/oneshot_read/main/oneshot_read_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/peripherals/adc/oneshot_read/main/oneshot_read_main.c b/examples/peripherals/adc/oneshot_read/main/oneshot_read_main.c index 3e17294b50..ba51131c86 100644 --- a/examples/peripherals/adc/oneshot_read/main/oneshot_read_main.c +++ b/examples/peripherals/adc/oneshot_read/main/oneshot_read_main.c @@ -63,8 +63,8 @@ void app_main(void) //-------------ADC1 Config---------------// adc_oneshot_chan_cfg_t config = { - .bitwidth = ADC_BITWIDTH_DEFAULT, .atten = EXAMPLE_ADC_ATTEN, + .bitwidth = ADC_BITWIDTH_DEFAULT, }; ESP_ERROR_CHECK(adc_oneshot_config_channel(adc1_handle, EXAMPLE_ADC1_CHAN0, &config)); ESP_ERROR_CHECK(adc_oneshot_config_channel(adc1_handle, EXAMPLE_ADC1_CHAN1, &config));