- #include <esp_system.h>
- ... some code ...
- esp_chip_info_t chip_info[sizeof(esp_chip_info_t)]; // reserve memory for chip information
- esp_chip_info(chip_info); // get the ESP chip information
- esp_chip_model_t chip_Model = chip_info->model;
- ... some code ...
- switch(chip_Model) {
- case CHIP_ESP32:
- json_chipInfo["Model"] = "ESP32";
- break;
- case CHIP_ESP32S2:
- json_chipInfo["Model"] = "ESP32-S2";
- break;
- case CHIP_ESP32S3:
- json_chipInfo["Model"] = "ESP32-S3";
- break;
- default:
- json_chipInfo["Model"] = "Undefined";
- break;
- }
What is wrong? Is the file esp_system.h not the one published here: https://github.com/espressif/esp-idf/bl ... p_system.h ?