You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stm32/eth: Restructure LWIP initialization for static IP support.
This restructures the LWIP network interface initialization to allow
static IP configuration before active(True) is called, improving the
user experience and network configuration workflow.
Changes:
- Split netif initialization into early (eth_init) and late phases
- eth_netif_init_early() sets up netif structure in eth_init()
- eth_lwip_init() adds netif to network stack in eth_start()
- DHCP only starts if no static IP is configured (0.0.0.0)
- eth_stop() removes from stack but preserves netif for reuse
Workflow:
1. eth_init() -> netif structure ready for IP configuration
2. User can set static IP via ipconfig() before active(True)
3. eth_start() -> adds to network stack, starts DHCP if needed
4. eth_stop() -> removes from network stack, preserves config
This allows the common pattern:
eth = network.LAN()
eth.ipconfig(addr='192.168.1.100', ...) # Set static IP
eth.active(True) # Start networking
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Andrew Leech <[email protected]>
0 commit comments