How llunohodl/esp32_lan8742 works
This is a small ESP32 Ethernet PHY driver and network-initialization example. The user supplies IP settings to app_net_ini(), which initializes the Ethernet interface, installs and starts the driver, and tracks connectivity through an event-group bit that the application can poll. The LAN8742A component implements the ESP-IDF PHY interface and reports link state through its mediator. The excerpts support these main calls; additional PHY internals and event wiring are not fully shown.
Main entry points: net_app.c Network setup · esp_eth_phy_lan8742a.c LAN8742A PHY · net_app.h IP configuration
Components 9
Network app
- Network setup
net_app.c - IP configuration
net_app.h - Connection status
net_app.h - Ethernet and IP events
net_app.c
LAN8742A driver
- LAN8742A PHY
esp_eth_phy_lan8742a.c
ESP-IDF platform
- ESP Ethernet driver
- TCP/IP adapter
- ESP event loop
Other components
- Application
Connections 11
- Application → Network setup: calls
README.md - Application → IP configuration: provides
README.md - Network setup → IP configuration: reads
net_app.c - Network setup → Connection status: clears
net_app.c - Ethernet and IP events → Connection status: sets or clears
net_app.c - Network setup → Ethernet and IP events: registers
net_app.c - Network setup → TCP/IP adapter: configures
net_app.c - Network setup → ESP event loop: registers handlers
net_app.c - Network setup → ESP Ethernet driver: installs and starts
net_app.c - Network setup → LAN8742A PHY: constructs
net_app.c - LAN8742A PHY → ESP Ethernet driver: reports link state
esp_eth_phy_lan8742a.c