diff --git a/cores/esp32/Esp.cpp b/cores/esp32/Esp.cpp index 11e9018f..0220c989 100644 --- a/cores/esp32/Esp.cpp +++ b/cores/esp32/Esp.cpp @@ -23,7 +23,6 @@ #include "esp_spi_flash.h" #include #include -#include #include extern "C" { #include "esp_ota_ops.h" @@ -35,6 +34,7 @@ extern "C" { #ifdef ESP_IDF_VERSION_MAJOR // IDF 4+ #if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4 #include "esp32/rom/spi_flash.h" +#include "soc/efuse_reg.h" #elif CONFIG_IDF_TARGET_ESP32S2 #include "esp32s2/rom/spi_flash.h" #else @@ -244,6 +244,7 @@ uint8_t EspClass::getChipRevision(void) const char * EspClass::getChipModel(void) { +#if CONFIG_IDF_TARGET_ESP32 uint32_t chip_ver = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG); uint32_t pkg_ver = chip_ver & 0x7; switch (pkg_ver) { @@ -257,9 +258,14 @@ const char * EspClass::getChipModel(void) return "ESP32-PICO-D2"; case EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4 : return "ESP32-PICO-D4"; + case EFUSE_RD_CHIP_VER_PKG_ESP32PICOV302 : + return "ESP32-PICO-V3-02"; default: return "Unknown"; } +#elif CONFIG_IDF_TARGET_ESP32S2 + return "ESP32-S2"; +#endif } uint8_t EspClass::getChipCores(void) diff --git a/libraries/BLE/src/BLERemoteService.cpp b/libraries/BLE/src/BLERemoteService.cpp index dfd36a90..90de450f 100644 --- a/libraries/BLE/src/BLERemoteService.cpp +++ b/libraries/BLE/src/BLERemoteService.cpp @@ -243,7 +243,7 @@ std::map* BLERemoteService::getCharacteristi /** * @brief This function is designed to get characteristics map when we have multiple characteristics with the same UUID */ -void BLERemoteService::getCharacteristics(std::map* pCharacteristicMap) { +void BLERemoteService::getCharacteristics(std::map** pCharacteristicMap) { log_v(">> getCharacteristics() for service: %s", getUUID().toString().c_str()); // If is possible that we have not read the characteristics associated with the service so do that // now. The request to retrieve the characteristics by calling "retrieveCharacteristics" is a blocking @@ -252,7 +252,7 @@ void BLERemoteService::getCharacteristics(std::map