|
32 | 32 | #include "esp32c6/rom/rtc.h" |
33 | 33 | #define ESP_TARGET "ESP32-C6"; |
34 | 34 | #elif CONFIG_IDF_TARGET_ESP32P4 // 🌙 |
35 | | -#include "esp32p4/rom/rtc.h" |
36 | | -#define ESP_TARGET "ESP32-P4"; |
| 35 | + #include "esp32p4/rom/rtc.h" |
| 36 | + #define ESP_TARGET "ESP32-P4"; |
| 37 | + #include "esp_hosted_api_types.h" |
| 38 | + #include <esp_hosted.h> |
| 39 | + // #include "esp_hosted_host_fw_ver.h" |
| 40 | + // #include "esp_hosted_misc.h" |
| 41 | + // #include "esp_hosted_ota.h" |
37 | 42 | #else |
38 | 43 | #error Target CONFIG_IDF_TARGET is not supported |
39 | 44 | #endif |
@@ -169,6 +174,13 @@ esp_err_t SystemStatus::systemStatus(PsychicRequest *request) |
169 | 174 | root["core_temp"] = temperatureRead(); |
170 | 175 | root["cpu_reset_reason"] = verbosePrintResetReason(esp_reset_reason()); |
171 | 176 | root["uptime"] = millis() / 1000; |
| 177 | + #ifdef CONFIG_IDF_TARGET_ESP32P4 |
| 178 | + esp_hosted_coprocessor_fwver_t c6_fw_version; |
| 179 | + esp_hosted_get_coprocessor_fwversion(&c6_fw_version); |
| 180 | + char hfw[10]; |
| 181 | + snprintf(hfw, 32, "v%d.%d.%d", c6_fw_version.major1, c6_fw_version.minor1, c6_fw_version.patch1); |
| 182 | + root["coprocessor"] = hfw; |
| 183 | + #endif |
172 | 184 |
|
173 | 185 | heapHealth(root["heap_info_app"].to<JsonVariant>(), MALLOC_CAP_INTERNAL); |
174 | 186 | heapHealth(root["heap_info_dma"].to<JsonVariant>(), MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA); |
|
0 commit comments