Adjust ESP32-P4 chip compatibility Add Waveshare ESP32-P4-NANO board support (#589)

* Added ESP32-P4 chip support

* Add Waveshare ESP32-P4-NANO board support

* Add Waveshare ESP32-P4-NANO board support

* Add prefix "Waveshare" to waveshare products

* Adjust the ESP32-P4-NANO README and fix the index link.

* Update code style

* Optimize code styles

* Adjust to naming requirements

* Adjust to naming requirements
This commit is contained in:
Y1hsiaochunnn
2025-05-16 02:41:35 +08:00
committed by GitHub
parent 45c62f5a53
commit 1c63934756
10 changed files with 426 additions and 8 deletions

View File

@@ -8,7 +8,9 @@
#include <esp_partition.h>
#include <esp_app_desc.h>
#include <esp_ota_ops.h>
#if CONFIG_IDF_TARGET_ESP32P4
#include "esp_wifi_remote.h"
#endif
#define TAG "SystemInfo"
@@ -31,7 +33,11 @@ size_t SystemInfo::GetFreeHeapSize() {
std::string SystemInfo::GetMacAddress() {
uint8_t mac[6];
#if CONFIG_IDF_TARGET_ESP32P4
esp_wifi_get_mac(WIFI_IF_STA, mac);
#else
esp_read_mac(mac, ESP_MAC_WIFI_STA);
#endif
char mac_str[18];
snprintf(mac_str, sizeof(mac_str), "%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
return std::string(mac_str);