diff options
Diffstat (limited to 'ports/esp32/adc.h')
| -rw-r--r-- | ports/esp32/adc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/esp32/adc.h b/ports/esp32/adc.h index ae5c0d3c3..61771255d 100644 --- a/ports/esp32/adc.h +++ b/ports/esp32/adc.h @@ -30,6 +30,7 @@ #include "py/runtime.h" #include "esp_adc_cal.h" +#include "esp_adc/adc_cali_scheme.h" #define ADC_ATTEN_MAX SOC_ADC_ATTEN_NUM @@ -38,7 +39,11 @@ typedef struct _machine_adc_block_obj_t { adc_unit_t unit_id; mp_int_t bits; adc_bits_width_t width; + #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 1) + adc_cali_handle_t *handle[ADC_ATTEN_MAX]; + #else esp_adc_cal_characteristics_t *characteristics[ADC_ATTEN_MAX]; + #endif } machine_adc_block_obj_t; typedef struct _machine_adc_obj_t { |
