mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-13 14:51:21 +10:00
adds chip revision efuse
not sure what use this is, as getChipRevision is usually the same anyway... shrug
This commit is contained in:
+8
-3
@@ -1307,12 +1307,17 @@ String WiFiManager::getInfoData(String id){
|
||||
p = FPSTR(HTTP_INFO_chipid);
|
||||
p.replace(FPSTR(T_1),(String)WIFI_getChipId());
|
||||
}
|
||||
#ifdef ESP32
|
||||
else if(id==F("chiprev")){
|
||||
#ifdef ESP32
|
||||
p = FPSTR(HTTP_INFO_chiprev);
|
||||
p.replace(FPSTR(T_1),(String)ESP.getChipRevision());
|
||||
#endif
|
||||
#ifdef _SOC_EFUSE_REG_H_
|
||||
String revb = (String)(REG_READ(EFUSE_BLK0_RDATA3_REG) >> (EFUSE_RD_CHIP_VER_RESERVE_S)&&EFUSE_RD_CHIP_VER_RESERVE_V);
|
||||
p.replace(FPSTR(T_1),rev+"<br/>"+revb);
|
||||
#else
|
||||
p.replace(FPSTR(T_1),rev);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
else if(id==F("fchipid")){
|
||||
#ifdef ESP8266
|
||||
p = FPSTR(HTTP_INFO_fchipid);
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
// #define WM_ERASE_NVS // esp32 erase(true) will erase NVS
|
||||
// #define WM_RTC // esp32 info page will include reset reasons
|
||||
|
||||
// #include "soc/efuse_reg.h" // include to add efuse chip rev to info, getChipRevision() is almost always the same though, so not sure why it matters.
|
||||
|
||||
#define WM_WEBSERVERSHIM // use webserver shim lib
|
||||
|
||||
#ifdef ESP8266
|
||||
|
||||
Reference in New Issue
Block a user