Skip to content

Commit 807cbbf

Browse files
committed
Merge branch 'refactor/remove_legacy_adc_driver' into 'master'
adc: removed the legacy adc driver and legacy adc calibration driver since v6.0 Closes IDF-13177 See merge request espressif/esp-idf!39478
2 parents 35f2cca + 6abac38 commit 807cbbf

File tree

39 files changed

+43
-4097
lines changed

39 files changed

+43
-4097
lines changed

components/driver/CMakeLists.txt

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ set(includes "deprecated"
1616
# Always included linker fragments
1717
set(ldfragments "")
1818

19-
# ADC related source files (deprecated)
20-
if(CONFIG_SOC_ADC_SUPPORTED)
21-
list(APPEND srcs "deprecated/adc_legacy.c")
22-
23-
if(CONFIG_SOC_ADC_DMA_SUPPORTED)
24-
list(APPEND srcs "deprecated/adc_dma_legacy.c")
25-
endif()
26-
endif()
27-
2819
# I2C related source files
2920
if(CONFIG_SOC_I2C_SUPPORTED)
3021
list(APPEND srcs "i2c/i2c.c")
@@ -61,18 +52,11 @@ if(CONFIG_SOC_TWAI_SUPPORTED AND NOT CONFIG_SOC_TWAI_SUPPORT_FD)
6152
list(APPEND ldfragments "twai/linker.lf")
6253
endif()
6354

64-
# Other source files
65-
if(${target} STREQUAL "esp32")
66-
list(APPEND srcs "deprecated/adc_i2s_deprecated.c")
67-
endif()
68-
6955
if(BOOTLOADER_BUILD)
7056
# Bootloader shall NOT depend on the drivers
7157
idf_component_register()
7258
else()
7359
# (REQUIRES cannot hide soc headers, since many arguments in the driver headers are chip-dependent)
74-
# (Legacy drivers requires `esp_adc`, due to ADC HW resource mutex logics are there.
75-
# Can be removed together with legacy drivers)
7660
idf_component_register(SRCS "${srcs}"
7761
INCLUDE_DIRS ${includes}
7862
PRIV_REQUIRES efuse esp_timer esp_mm
@@ -86,9 +70,4 @@ else()
8670
esp_driver_twai
8771
LDFRAGMENTS ${ldfragments}
8872
)
89-
if(CONFIG_SOC_ADC_SUPPORTED AND
90-
CONFIG_COMPILER_STATIC_ANALYZER AND CMAKE_C_COMPILER_ID STREQUAL "GNU") # TODO GCC-366
91-
set_source_files_properties(deprecated/adc_legacy.c
92-
PROPERTIES COMPILE_FLAGS "-Wno-analyzer-use-of-uninitialized-value")
93-
endif()
9473
endif()

components/driver/Kconfig

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2,72 +2,6 @@ menu "Driver Configurations"
22

33
orsource "./twai/Kconfig.twai"
44

5-
menu "Legacy ADC Driver Configuration"
6-
7-
config ADC_DISABLE_DAC
8-
depends on SOC_DAC_SUPPORTED
9-
bool "Disable DAC when ADC2 is used on GPIO 25 and 26"
10-
default y
11-
help
12-
If this is set, the ADC2 driver will disable the output of the DAC corresponding to the specified
13-
channel. This is the default value.
14-
15-
For testing, disable this option so that we can measure the output of DAC by internal ADC.
16-
17-
config ADC_SUPPRESS_DEPRECATE_WARN
18-
bool "Suppress legacy driver deprecated warning"
19-
default n
20-
help
21-
Whether to suppress the deprecation warnings when using legacy adc driver (driver/adc.h).
22-
If you want to continue using the legacy driver, and don't want to see related deprecation warnings,
23-
you can enable this option.
24-
25-
config ADC_SKIP_LEGACY_CONFLICT_CHECK
26-
bool "Skip legacy conflict check"
27-
default n
28-
help
29-
This configuration option allows the user to bypass the conflict check mechanism with legacy code.
30-
menu "Legacy ADC Calibration Configuration"
31-
32-
config ADC_CAL_EFUSE_TP_ENABLE
33-
depends on IDF_TARGET_ESP32
34-
bool "Use Two Point Values"
35-
default "y"
36-
help
37-
Some ESP32s have Two Point calibration values burned into eFuse BLOCK3.
38-
This option will allow the ADC calibration component to characterize the
39-
ADC-Voltage curve using Two Point values if they are available.
40-
41-
config ADC_CAL_EFUSE_VREF_ENABLE
42-
depends on IDF_TARGET_ESP32
43-
bool "Use eFuse Vref"
44-
default "y"
45-
help
46-
Some ESP32s have Vref burned into eFuse BLOCK0. This option will allow
47-
the ADC calibration component to characterize the ADC-Voltage curve using
48-
eFuse Vref if it is available.
49-
50-
config ADC_CAL_LUT_ENABLE
51-
depends on IDF_TARGET_ESP32
52-
bool "Use Lookup Tables"
53-
default "y"
54-
help
55-
This option will allow the ADC calibration component to use Lookup Tables
56-
to correct for non-linear behavior in 11db attenuation. Other attenuations
57-
do not exhibit non-linear behavior hence will not be affected by this option.
58-
59-
config ADC_CALI_SUPPRESS_DEPRECATE_WARN
60-
bool "Suppress legacy driver deprecated warning"
61-
default n
62-
help
63-
Whether to suppress the deprecation warnings when using legacy adc calibration
64-
driver (esp_adc_cal.h).
65-
If you want to continue using the legacy driver, and don't want to see related
66-
deprecation warnings, you can enable this option.
67-
68-
endmenu # Legacy ADC Calibration Configuration
69-
endmenu # Legacy ADC Driver Configuration
70-
715
menu "Legacy MCPWM Driver Configurations"
726
depends on SOC_MCPWM_SUPPORTED
737
config MCPWM_SUPPRESS_DEPRECATE_WARN

components/driver/deprecated/adc1_private.h

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)