mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-25 23:37:16 +00:00
Add ESP32 revision information
This commit is contained in:
parent
c4f233984a
commit
5d40295fa6
@ -590,14 +590,14 @@ void CmndStatus(void)
|
|||||||
",\"" D_JSON_BOOTVERSION "\":%d"
|
",\"" D_JSON_BOOTVERSION "\":%d"
|
||||||
#endif
|
#endif
|
||||||
",\"" D_JSON_COREVERSION "\":\"" ARDUINO_CORE_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\","
|
",\"" D_JSON_COREVERSION "\":\"" ARDUINO_CORE_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\","
|
||||||
"\"CpuFrequency\":%d,\"Hardware\":\"%s\""
|
"\"CpuFrequency\":%d,\"Hardware\":\"%s%s\""
|
||||||
"%s}}"),
|
"%s}}"),
|
||||||
TasmotaGlobal.version, TasmotaGlobal.image_name, GetBuildDateAndTime().c_str()
|
TasmotaGlobal.version, TasmotaGlobal.image_name, GetBuildDateAndTime().c_str()
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
, ESP.getBootVersion()
|
, ESP.getBootVersion()
|
||||||
#endif
|
#endif
|
||||||
, ESP.getSdkVersion(),
|
, ESP.getSdkVersion(),
|
||||||
ESP.getCpuFreqMHz(), GetDeviceHardware().c_str(),
|
ESP.getCpuFreqMHz(), GetDeviceHardware().c_str(), GetDeviceHardwareRevision().c_str(),
|
||||||
GetStatistics().c_str());
|
GetStatistics().c_str());
|
||||||
CmndStatusResponse(2);
|
CmndStatusResponse(2);
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,10 @@ String GetDeviceHardware(void) {
|
|||||||
return F("ESP8266EX");
|
return F("ESP8266EX");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String GetDeviceHardwareRevision(void) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*********************************************************************************************\
|
/*********************************************************************************************\
|
||||||
@ -659,6 +663,7 @@ typedef struct {
|
|||||||
if (rev3) { return F("ESP32-PICO-V3"); } // Max 240MHz, Dual core, LGA 7*7, ESP32-PICO-V3-ZERO, ESP32-PICO-V3-ZERO-DevKit
|
if (rev3) { return F("ESP32-PICO-V3"); } // Max 240MHz, Dual core, LGA 7*7, ESP32-PICO-V3-ZERO, ESP32-PICO-V3-ZERO-DevKit
|
||||||
else { return F("ESP32-PICO-D4"); } // Max 240MHz, Dual core, LGA 7*7, 4MB embedded flash, ESP32-PICO-KIT
|
else { return F("ESP32-PICO-D4"); } // Max 240MHz, Dual core, LGA 7*7, 4MB embedded flash, ESP32-PICO-KIT
|
||||||
case 6: return F("ESP32-PICO-V3-02"); // Max 240MHz, Dual core, LGA 7*7, 8MB embedded flash, 2MB embedded PSRAM, ESP32-PICO-MINI-02, ESP32-PICO-DevKitM-2
|
case 6: return F("ESP32-PICO-V3-02"); // Max 240MHz, Dual core, LGA 7*7, 8MB embedded flash, 2MB embedded PSRAM, ESP32-PICO-MINI-02, ESP32-PICO-DevKitM-2
|
||||||
|
case 7: return F("ESP32-D0WDR2-V3"); // Max 240MHz, Dual core, QFN 5*5, ESP32-WROOM-32E, ESP32_WROVER-E, ESP32-DevKitC?
|
||||||
}
|
}
|
||||||
#endif // CONFIG_IDF_TARGET_ESP32
|
#endif // CONFIG_IDF_TARGET_ESP32
|
||||||
return F("ESP32");
|
return F("ESP32");
|
||||||
@ -767,6 +772,24 @@ typedef struct {
|
|||||||
return F("ESP32");
|
return F("ESP32");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String GetDeviceHardwareRevision(void) {
|
||||||
|
/*
|
||||||
|
// The structure represents information about the chip
|
||||||
|
typedef struct {
|
||||||
|
esp_chip_model_t model; //!< chip model, one of esp_chip_model_t
|
||||||
|
uint32_t features; //!< bit mask of CHIP_FEATURE_x feature flags
|
||||||
|
uint8_t cores; //!< number of CPU cores
|
||||||
|
uint8_t revision; //!< chip revision number
|
||||||
|
} esp_chip_info_t;
|
||||||
|
*/
|
||||||
|
esp_chip_info_t chip_info;
|
||||||
|
esp_chip_info(&chip_info);
|
||||||
|
|
||||||
|
char revision[12];
|
||||||
|
snprintf_P(revision, sizeof(revision), PSTR(" (rev. %d)"), chip_info.revision);
|
||||||
|
return revision;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ESP32 v1 and v2 needs some special patches to use PSRAM.
|
* ESP32 v1 and v2 needs some special patches to use PSRAM.
|
||||||
* Standard Tasmota 32 do not include those patches.
|
* Standard Tasmota 32 do not include those patches.
|
||||||
|
@ -2420,7 +2420,7 @@ void HandleInformation(void)
|
|||||||
#endif // USE_DISCOVERY
|
#endif // USE_DISCOVERY
|
||||||
|
|
||||||
WSContentSend_P(PSTR("}1}2 ")); // Empty line
|
WSContentSend_P(PSTR("}1}2 ")); // Empty line
|
||||||
WSContentSend_P(PSTR("}1" D_ESP_CHIP_ID "}2%d (%s)"), ESP_getChipId(), GetDeviceHardware().c_str());
|
WSContentSend_P(PSTR("}1" D_ESP_CHIP_ID "}2%d (%s%s)"), ESP_getChipId(), GetDeviceHardware().c_str(), GetDeviceHardwareRevision().c_str());
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
WSContentSend_P(PSTR("}1" D_FLASH_CHIP_ID "}20x%06X"), ESP.getFlashChipId());
|
WSContentSend_P(PSTR("}1" D_FLASH_CHIP_ID "}20x%06X"), ESP.getFlashChipId());
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user