forked from espressif/arduino-esp32
more fixes
This commit is contained in:
@ -23,7 +23,6 @@
|
|||||||
#include "esp_spi_flash.h"
|
#include "esp_spi_flash.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <soc/soc.h>
|
#include <soc/soc.h>
|
||||||
#include <soc/efuse_reg.h>
|
|
||||||
#include <esp_partition.h>
|
#include <esp_partition.h>
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "esp_ota_ops.h"
|
#include "esp_ota_ops.h"
|
||||||
@ -35,6 +34,7 @@ extern "C" {
|
|||||||
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+
|
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+
|
||||||
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
|
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
|
||||||
#include "esp32/rom/spi_flash.h"
|
#include "esp32/rom/spi_flash.h"
|
||||||
|
#include "soc/efuse_reg.h"
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||||
#include "esp32s2/rom/spi_flash.h"
|
#include "esp32s2/rom/spi_flash.h"
|
||||||
#else
|
#else
|
||||||
@ -244,6 +244,7 @@ uint8_t EspClass::getChipRevision(void)
|
|||||||
|
|
||||||
const char * EspClass::getChipModel(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 chip_ver = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
|
||||||
uint32_t pkg_ver = chip_ver & 0x7;
|
uint32_t pkg_ver = chip_ver & 0x7;
|
||||||
switch (pkg_ver) {
|
switch (pkg_ver) {
|
||||||
@ -257,9 +258,14 @@ const char * EspClass::getChipModel(void)
|
|||||||
return "ESP32-PICO-D2";
|
return "ESP32-PICO-D2";
|
||||||
case EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4 :
|
case EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4 :
|
||||||
return "ESP32-PICO-D4";
|
return "ESP32-PICO-D4";
|
||||||
|
case EFUSE_RD_CHIP_VER_PKG_ESP32PICOV302 :
|
||||||
|
return "ESP32-PICO-V3-02";
|
||||||
default:
|
default:
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||||
|
return "ESP32-S2";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t EspClass::getChipCores(void)
|
uint8_t EspClass::getChipCores(void)
|
||||||
|
@ -243,7 +243,7 @@ std::map<uint16_t, BLERemoteCharacteristic*>* BLERemoteService::getCharacteristi
|
|||||||
/**
|
/**
|
||||||
* @brief This function is designed to get characteristics map when we have multiple characteristics with the same UUID
|
* @brief This function is designed to get characteristics map when we have multiple characteristics with the same UUID
|
||||||
*/
|
*/
|
||||||
void BLERemoteService::getCharacteristics(std::map<uint16_t, BLERemoteCharacteristic*>* pCharacteristicMap) {
|
void BLERemoteService::getCharacteristics(std::map<uint16_t, BLERemoteCharacteristic*>** pCharacteristicMap) {
|
||||||
log_v(">> getCharacteristics() for service: %s", getUUID().toString().c_str());
|
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
|
// 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
|
// now. The request to retrieve the characteristics by calling "retrieveCharacteristics" is a blocking
|
||||||
@ -252,7 +252,7 @@ void BLERemoteService::getCharacteristics(std::map<uint16_t, BLERemoteCharacteri
|
|||||||
retrieveCharacteristics();
|
retrieveCharacteristics();
|
||||||
}
|
}
|
||||||
log_v("<< getCharacteristics() for service: %s", getUUID().toString().c_str());
|
log_v("<< getCharacteristics() for service: %s", getUUID().toString().c_str());
|
||||||
*pCharacteristicMap = m_characteristicMapByHandle;
|
*pCharacteristicMap = &m_characteristicMapByHandle;
|
||||||
} // Get the characteristics map.
|
} // Get the characteristics map.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user