fxmac_rs
路径:
drivers/net/fxmac_rs类型:库 crate 分层:组件层 / 可复用基础组件 版本:0.4.1文档依据:当前仓库源码、Cargo.toml与drivers/net/fxmac_rs/README.md
fxmac_rs 的核心定位是:FXMAC Ethernet driver in Rust for PhytiumPi (Phytium Pi) board, supporting DMA-based packet transmission and reception.
架构设计
- 目录角色:可复用基础组件
- crate 形态:库 crate
- 工作区位置:根工作区
- feature 视角:主要通过
debug控制编译期能力装配。 - 关键数据结构:可直接观察到的关键数据结构/对象包括
FXmac、FXmacConfig、FXmacQueue、FXmacBdRing、FXmacNetifBuffer、FXmacPhyInterface、FXmacBd、FXmacIntrHandler、FXMAC_HANDLER_DMASEND、FXMAC_HANDLER_DMARECV等(另有 1 个关键类型/对象)。 - 设计重心:该 crate 通常作为多个内核子系统共享的底层构件,重点在接口边界、数据结构和被上层复用的方式。
模块结构
fxmac_const:FXMAC hardware register offsets and bit definitions. This module mirrors the low-level register layout from the FXMAC hardware specification and is primarily intended for internal…fxmac:Core FXMAC Ethernet controller functionality. This module provides the main data structures and functions for controlling the FXMAC Ethernet MAC controllerfxmac_dma:DMA buffer descriptor management for FXMAC Ethernet. This module handles DMA-based packet transmission and reception, including buffer descriptor ring managementfxmac_intr