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
This commit is contained in:
Ludovic BOUÉ 2024-08-05 15:04:16 +02:00 committed by Armando (Dou Yiwen)
parent 82e76abaa8
commit e1ef3f7451

View File

@ -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));