Skip to content

Commit

Permalink
ESP.getFlashChipMode(); // removed, it crashes with ESP32-S3
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesgiguere committed Jun 2, 2024
1 parent e45f03f commit ed3a520
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gpio_viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,16 @@ class GPIOViewer
void sendESPInfo(AsyncWebServerRequest *request)
{

const FlashMode_t flashMode = ESP.getFlashChipMode(); // enum
// const FlashMode_t flashMode = ESP.getFlashChipMode(); // removed, it crashes with ESP32-S3
const char* flashMode = "\"not available\"";

String jsonResponse = "{\"chip_model\": \"" + String(ESP.getChipModel()) + "\",";
jsonResponse += "\"cores_count\": \"" + String(ESP.getChipCores()) + "\",";
jsonResponse += "\"chip_revision\": \"" + String(ESP.getChipRevision()) + "\",";
jsonResponse += "\"cpu_frequency\": \"" + String(ESP.getCpuFreqMHz()) + "\",";
jsonResponse += "\"cycle_count\": " + String(ESP.getCycleCount()) + ",";
jsonResponse += "\"mac\": \"" + String(ESP.getEfuseMac()) + "\",";
jsonResponse += "\"flash_mode\": " + String(flashMode) + ",";
jsonResponse += "\"flash_mode\": " + String(flashMode) + ",";
jsonResponse += "\"flash_chip_size\": " + String(ESP.getFlashChipSize()) + ",";
jsonResponse += "\"flash_chip_speed\": " + String(ESP.getFlashChipSpeed()) + ",";
jsonResponse += "\"heap_size\": " + String(ESP.getHeapSize()) + ",";
Expand Down

0 comments on commit ed3a520

Please sign in to comment.