esp-bsp icon indicating copy to clipboard operation
esp-bsp copied to clipboard

fix(bsp): fix idf5.0 adc build with unknown type error

Open leeebo opened this issue 1 year ago • 1 comments

ESP-BSP Pull Request checklist

Note: For new BSPs create a PR with this link.

  • [x] Version of modified component bumped
  • [ ] CI passing

Change description

  • Explicit include esp_adc/adc_cali_scheme.h in BSP header to support IDF 5.0

bsp like esp32_s3_usb_otg esp32_s3_lcd_ev_board build under IDF 5.0 always failed with error:

.../managed_components/espressif__esp32_s3_usb_otg/esp32_s3_usb_otg_idf5.c:14:8: error: unknown type name 'adc_cali_handle_t'
   14 | static adc_cali_handle_t bsp_adc_cali_handle; /* ADC1 calibration handle */

...

error: unknown type name 'adc_cali_curve_fitting_config_t'

The root cause is esp_adc/adc_oneshot.h in IDF 5.0 not explicit include esp_adc/adc_cali_scheme.h

While IDF 5.1 and later versions include esp_adc/adc_cali_scheme.h in esp_adc/adc_oneshot.h

leeebo avatar Sep 20 '24 11:09 leeebo

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 20 '24 11:09 CLAassistant