Skip to content

Commit 5ecb491

Browse files
committed
more fixes
1 parent b5efb47 commit 5ecb491

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

cores/esp32/Esp.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "esp_spi_flash.h"
2424
#include <memory>
2525
#include <soc/soc.h>
26-
#include <soc/efuse_reg.h>
2726
#include <esp_partition.h>
2827
extern "C" {
2928
#include "esp_ota_ops.h"
@@ -35,6 +34,7 @@ extern "C" {
3534
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+
3635
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
3736
#include "esp32/rom/spi_flash.h"
37+
#include "soc/efuse_reg.h"
3838
#elif CONFIG_IDF_TARGET_ESP32S2
3939
#include "esp32s2/rom/spi_flash.h"
4040
#else
@@ -244,6 +244,7 @@ uint8_t EspClass::getChipRevision(void)
244244

245245
const char * EspClass::getChipModel(void)
246246
{
247+
#if CONFIG_IDF_TARGET_ESP32
247248
uint32_t chip_ver = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
248249
uint32_t pkg_ver = chip_ver & 0x7;
249250
switch (pkg_ver) {
@@ -257,9 +258,14 @@ const char * EspClass::getChipModel(void)
257258
return "ESP32-PICO-D2";
258259
case EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4 :
259260
return "ESP32-PICO-D4";
261+
case EFUSE_RD_CHIP_VER_PKG_ESP32PICOV302 :
262+
return "ESP32-PICO-V3-02";
260263
default:
261264
return "Unknown";
262265
}
266+
#elif CONFIG_IDF_TARGET_ESP32S2
267+
return "ESP32-S2";
268+
#endif
263269
}
264270

265271
uint8_t EspClass::getChipCores(void)

libraries/BLE/src/BLERemoteService.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ std::map<uint16_t, BLERemoteCharacteristic*>* BLERemoteService::getCharacteristi
243243
/**
244244
* @brief This function is designed to get characteristics map when we have multiple characteristics with the same UUID
245245
*/
246-
void BLERemoteService::getCharacteristics(std::map<uint16_t, BLERemoteCharacteristic*>* pCharacteristicMap) {
246+
void BLERemoteService::getCharacteristics(std::map<uint16_t, BLERemoteCharacteristic*>** pCharacteristicMap) {
247247
log_v(">> getCharacteristics() for service: %s", getUUID().toString().c_str());
248248
(void)pCharacteristicMap;
249249
// If is possible that we have not read the characteristics associated with the service so do that
@@ -253,7 +253,7 @@ void BLERemoteService::getCharacteristics(std::map<uint16_t, BLERemoteCharacteri
253253
retrieveCharacteristics();
254254
}
255255
log_v("<< getCharacteristics() for service: %s", getUUID().toString().c_str());
256-
*pCharacteristicMap = m_characteristicMapByHandle;
256+
*pCharacteristicMap = &m_characteristicMapByHandle;
257257
} // Get the characteristics map.
258258

259259
/**

0 commit comments

Comments
 (0)