forked from espressif/esp-idf
Merge branch 'fix-for-adc-continious-receiver' into 'master'
adc: update continuous read example output type (PR11347) Closes IDFGH-10071 See merge request espressif/esp-idf!23643
This commit is contained in:
@@ -122,7 +122,7 @@ void app_main(void)
|
|||||||
if (ret == ESP_OK) {
|
if (ret == ESP_OK) {
|
||||||
ESP_LOGI("TASK", "ret is %x, ret_num is %"PRIu32" bytes", ret, ret_num);
|
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) {
|
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 chan_num = EXAMPLE_ADC_GET_CHANNEL(p);
|
||||||
uint32_t data = EXAMPLE_ADC_GET_DATA(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 */
|
/* Check the channel number validation, the data is invalid if the channel num exceed the maximum channel */
|
||||||
|
Reference in New Issue
Block a user