forked from espressif/esp-idf
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 <douyiwen@espressif.com> Merges https://github.com/espressif/esp-idf/pull/11347
This commit is contained in:
committed by
Armando
parent
9fb7542e6c
commit
9d1747dd59
@@ -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 */
|
||||
|
Reference in New Issue
Block a user