Description
Comparing the networking options for ESP32, WLAN() is nice since it doesn't require any arguments, whereas EMAC-based LAN() requires 4 arguments (mdc, mdio, phy_type, and phy_addr) that can force the user to dive into board schematics and PHY datasheets to determine correct values for those arguments.
I propose enabling mpconfigboard.h to define default values for these 4 arguments so the user can simply call LAN() with no parameters to construct a valid object for their board. This would also apply to the changes in #19036. The GENERIC boards can default to those used by Espressif's dev boards.
I'm not sure whether it would be feasible to do the same for SPI-based LAN(). The phy_type and phy_addr could have defaults in mpconfigboard.h, but I don't know how the SPI arguments could be specified.
Code Size
This would have minimal impact on code size, if at all.
Implementation
I hope the MicroPython maintainers or community will implement this feature
Code of Conduct
Yes, I agree
Description
Comparing the networking options for ESP32,
WLAN()is nice since it doesn't require any arguments, whereas EMAC-basedLAN()requires 4 arguments (mdc,mdio,phy_type, andphy_addr) that can force the user to dive into board schematics and PHY datasheets to determine correct values for those arguments.I propose enabling
mpconfigboard.hto define default values for these 4 arguments so the user can simply callLAN()with no parameters to construct a valid object for their board. This would also apply to the changes in #19036. TheGENERICboards can default to those used by Espressif's dev boards.I'm not sure whether it would be feasible to do the same for SPI-based
LAN(). Thephy_typeandphy_addrcould have defaults inmpconfigboard.h, but I don't know how the SPI arguments could be specified.Code Size
This would have minimal impact on code size, if at all.
Implementation
I hope the MicroPython maintainers or community will implement this feature
Code of Conduct
Yes, I agree