From 9d1747dd5946fe28150d50e8ce38eb4c3a2cd3de Mon Sep 17 00:00:00 2001 From: Alexey Lantushenko Date: Sun, 7 May 2023 15:57:29 +0300 Subject: [PATCH] 1. The example does not work with when board only supports TYPE1 format 2. The example has syntax error converting void* to adc_digi_output_data_t* Signed-off-by: Armando Merges https://github.com/espressif/esp-idf/pull/11347 --- .../peripherals/adc/continuous_read/main/continuous_read_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/peripherals/adc/continuous_read/main/continuous_read_main.c b/examples/peripherals/adc/continuous_read/main/continuous_read_main.c index dfbdc84a6358..35a95d14865a 100644 --- a/examples/peripherals/adc/continuous_read/main/continuous_read_main.c +++ b/examples/peripherals/adc/continuous_read/main/continuous_read_main.c @@ -122,7 +122,7 @@ void app_main(void) if (ret == ESP_OK) { ESP_LOGI("TASK", "ret is %x, ret_num is %"PRIu32" bytes", ret, ret_num); for (int i = 0; i < ret_num; i += SOC_ADC_DIGI_RESULT_BYTES) { - adc_digi_output_data_t *p = (void*)&result[i]; + adc_digi_output_data_t *p = (adc_digi_output_data_t*)&result[i]; uint32_t chan_num = EXAMPLE_ADC_GET_CHANNEL(p); uint32_t data = EXAMPLE_ADC_GET_DATA(p); /* Check the channel number validation, the data is invalid if the channel num exceed the maximum channel */