From 7dad3237e45fa21172e4dd9a38ea3db5deddd8fd Mon Sep 17 00:00:00 2001 From: Kaze <89641145+shiinakaze@users.noreply.github.com> Date: Sat, 15 Nov 2025 18:07:39 +0800 Subject: [PATCH] Revise ESP-NETIF diagram for clarity Updated the diagram to clarify the data and event flow in the ESP-NETIF architecture. --- .../zh_CN/api-reference/network/esp_netif.rst | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/docs/zh_CN/api-reference/network/esp_netif.rst b/docs/zh_CN/api-reference/network/esp_netif.rst index 7e6e0e6cd99a..be9b9cf77f6c 100644 --- a/docs/zh_CN/api-reference/network/esp_netif.rst +++ b/docs/zh_CN/api-reference/network/esp_netif.rst @@ -149,42 +149,42 @@ ESP-NETIF 架构 .. code-block:: text - | (A) 用户代码 | - | 应用程序 | - .................| 初始化 设置 事件 | - . +----------------------------------------+ - . . | * - . . | * - --------+ +===========================+ * +-----------------------+ - | | 新建/配置 获取/设置/应用程序| * | 初始化 | - | | |...*.....| 应用程序 (DHCP, SNTP) | - | |---------------------------| * | | - 初始化 | | |**** | | - 启动 |************| 事件处理程序 |*********| DHCP | - 停止 | | | | | - | |---------------------------| | | - | | | | NETIF | - +-----| | | +-----------------+ | - |胶水层|---<----|---| esp_netif_transmit |--<------| netif_output | | - | | | | | | | | - | |--->----|---| esp_netif_receive |-->------| netif_input | | - | | | | | + ----------------+ | - | |...<....|...| esp_netif_free_rx_buffer |...<.....| 数据包 buffer | - +-----| | | | | | | - | | | | | | (D) | - (B) | | | | (C) | +-----------------------+ - --------+ | | +===========================+ 网络堆栈 - 网络 | | ESP-NETIF - 接口 | | - 驱动 | | +--------------------------------+ +------------------+ - | | | |.........| 开启/关闭 | - | | | | | | - | -<--| l2tap_write |-----<---| 写入 | - | | | | | - ---->--| esp_vfs_l2tap_eth_filter_frame |----->---| 读取 | - | | | (A) | - | (E) | +------------------+ - +--------------------------------+ 用户代码 + | (A) USER CODE | + | Apps | + .................| init settings events | + . +----------------------------------------+ + . . | * + . . | * + --------+ +================================+ * +-----------------------+ + | | new/config get/set/apps | * | init | + | | |...*.....| Apps (DHCP, SNTP) | + | |--------------------------------| * | | + init | | |**** | | + start |************| event handler |*********| DHCP | + stop | | | | | + | |--------------------------------| | | + | | | | NETIF | + +-----| | | +-----------------+ | + | glue|---<----|---| esp_netif_transmit |--<------| netif_output | | + | | | | | | | | + | |--->----|---| esp_netif_receive |-->------| netif_input | | + | | | | | + ----------------+ | + | |...<....|...| esp_netif_free_rx_buffer |...<.....| packet buffer | + +-----| | | | | | | + | | | | | | (D) | + (B) | | | | (C) | +-----------------------+ + --------+ | | +================================+ NETWORK STACK +NETWORK | | ESP-NETIF +INTERFACE | | +DRIVER | | +--------------------------------+ +------------------+ + | | | |.........| open/close | + | | | | | | + | -<--| l2tap_write |-----<---| write | + | | | | | + ---->--| esp_vfs_l2tap_eth_filter_frame |----->---| read | + | | | (A) | + | (E) | +------------------+ + +--------------------------------+ USER CODE ESP-NETIF L2 TAP