Skip to content

Commit a157181

Browse files
committed
refactor(driver): remove deprecated header files
use esp_private/periph_ctrl.h and esp_private/rtc_cntl.h in favor of driver/periph_ctrl.h and driver/rtc_cntl.h
1 parent d85ad74 commit a157181

File tree

6 files changed

+27
-17
lines changed

6 files changed

+27
-17
lines changed

components/driver/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
menu "Driver Configurations"
1+
menu "Legacy Driver Configurations"
22

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

components/driver/deprecated/driver/periph_ctrl.h

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

components/driver/deprecated/driver/rtc_cntl.h

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

docs/en/migration-guides/release-6.x/6.0/peripherals.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ All drivers' ``io_loop_back`` configuration have been removed
1111

1212
Different driver objects can share the same GPIO number, enabling more complex functionalities. For example, you can bind the TX and RX channels of the RMT peripheral to the same GPIO to simulate 1-Wire bus read and write timing. In previous versions, you needed to configure the ``io_loop_back`` setting in the driver to achieve this "loopback" functionality. Now, this configuration has been removed. Simply configuring the same GPIO number in different drivers will achieve the same functionality.
1313

14+
Peripheral Clock Gating
15+
~~~~~~~~~~~~~~~~~~~~~~~~
16+
17+
Peripheral clock gating is managed within the driver layer. Users do not need to manually handle peripheral module clock gating. Its corresponding APIs are included via a private header file ``esp_private/periph_ctrl.h``. There used to be another header file ``driver/periph_ctrl.h`` for the same purpose, which is now removed.
18+
19+
RTC Subsystem Control
20+
~~~~~~~~~~~~~~~~~~~~~~
21+
22+
Low power modules usually share some common resources like interrupt number. To avoid conflicts, some private APIs are created in the ``esp_private/rtc_ctrl.h`` header file to manage these shared resources with ease. There used to be another header file ``driver/rtc_cntl.h`` for the same purpose, which is now removed.
23+
1424
ADC
1525
---
1626

docs/zh_CN/migration-guides/release-6.x/6.0/peripherals.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111

1212
不同的驱动对象可以共享同一个 GPIO 编号,联合起来可以实现更加复杂的功能。比如将 RMT 外设的 TX 通道和 RX 通道绑定在同一个 GPIO 上,进而模拟单总线的读写时序。在以前的版本中,你需要在驱动的配置中额外设置 ``io_loop_back`` 来实现这种“回环”功能,现在,这个配置已经被移除。不同的驱动只需要在配置中设置相同的 GPIO 编号就能实现这个功能。
1313

14+
外设时钟门控
15+
~~~~~~~~~~~~
16+
17+
外设的时钟门控现在由驱动层统一管理,用户无需手动控制外设模块的时钟开关。相关的 API 位于私有头文件 ``esp_private/periph_ctrl.h`` 中。原先用于同样目的的头文件 ``driver/periph_ctrl.h`` 已被移除。
18+
19+
RTC 子系统控制
20+
~~~~~~~~~~~~~~
21+
22+
低功耗模块通常会共享一些资源,比如中断号。为避免资源冲突,私有头文件 ``esp_private/rtc_ctrl.h`` 提供了相关 API 方便管理这些共享资源。原先用于同样目的的头文件 ``driver/rtc_cntl.h`` 已被移除。
23+
1424
ADC
1525
---
1626

tools/idf_py_actions/hints.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@
111111
- re_variables: ['driver/can.h']
112112
hint_variables: ['driver/can.h', 'driver/twai.h']
113113

114+
- re_variables: ['driver/periph_ctrl.h']
115+
hint_variables: ['driver/periph_ctrl.h', 'esp_private/periph_ctrl.h']
116+
117+
- re_variables: ['driver/rtc_cntl.h']
118+
hint_variables: ['driver/rtc_cntl.h', 'esp_private/rtc_ctrl.h']
119+
114120
-
115121
re: "error: implicit declaration of function 'esp_int_wdt_\\w+'"
116122
hint: 'The Interrupt Watchdog API has been made private, it shall not be used anymore. You can still force its inclusion with #include "esp_private/esp_int_wdt.h" (not recommended)'

0 commit comments

Comments
 (0)