adds chip revision efuse

not sure what use this is, as getChipRevision is usually the same anyway... shrug
This commit is contained in:
tablatronix
2018-03-31 12:41:47 -05:00
parent 41b29fa08c
commit 49104d4bbb
2 changed files with 10 additions and 3 deletions
+8 -3
View File
@@ -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);
+2
View File
@@ -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