SmingHub / Sming

Sming - powerful open source framework simplifying the creation of embedded C++ applications.
https://sming.readthedocs.io
GNU Lesser General Public License v3.0
1.45k stars 349 forks source link

Support Esp8266 PHY settings runtime modification #2830

Closed mikee47 closed 1 week ago

mikee47 commented 1 week ago

The initial PHY data is used initialize an ESP8266 chip and controls its behaviour. This is stored in the phy_init partition and is loaded at startup.

Sometimes you may want to change that data for a certain ROM on the device without changing it for all ROMs on the device.

To do this, build with ENABLE_CUSTOM_PHY=1 and add code to your application:

#include <esp_phy.h>

void customPhyInit(PhyInitData data)
{
   // Use methods of `data` to modify as required
 data.set_vdd33_const(0xff);
}

This PR supersedes #1491 and provides a more C++ mechanism for adjusting the configuration at runtime.