Skip to content

Commit 016ded5

Browse files
committed
adc_continuous_handle_cfg_t add flags only after 5.2
1 parent ae3014d commit 016ded5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/AudioAnalog/AnalogDriverESP32V1.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,9 @@ class AnalogDriverESP32V1 : public AnalogDriverBase {
522522
adc_continuous_handle_cfg_t adc_config;
523523
adc_config.max_store_buf_size = (uint32_t)conv_frame_size * 2;
524524
adc_config.conv_frame_size = (uint32_t) conv_frame_size;
525+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0)
525526
adc_config.flags.flush_pool = true;
526-
527+
#endif
527528
err = adc_continuous_new_handle(&adc_config, &adc_handle);
528529
if (err != ESP_OK) {
529530
LOGE("adc_continuous_new_handle failed with error: %d", err);

0 commit comments

Comments
 (0)