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 */