mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-04 19:10:58 +02:00
efuse: Adds major and minor versions and others
This commit is contained in:
committed by
BOT
parent
ab6735155a
commit
3dcdcc08eb
@@ -30,6 +30,8 @@
|
||||
#include "soc/rtc.h"
|
||||
#include "hal/wdt_hal.h"
|
||||
#include "hal/cpu_hal.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "hal/efuse_ll.h"
|
||||
#include "freertos/xtensa_api.h"
|
||||
#include "soc/soc_memory_layout.h"
|
||||
|
||||
@@ -150,19 +152,19 @@ void IRAM_ATTR esp_restart_noos(void)
|
||||
|
||||
void esp_chip_info(esp_chip_info_t* out_info)
|
||||
{
|
||||
uint32_t efuse_rd3 = REG_READ(EFUSE_BLK0_RDATA3_REG);
|
||||
memset(out_info, 0, sizeof(*out_info));
|
||||
|
||||
out_info->model = CHIP_ESP32;
|
||||
out_info->revision = esp_efuse_get_chip_ver();
|
||||
out_info->revision = efuse_hal_get_major_chip_version();
|
||||
out_info->full_revision = efuse_hal_chip_revision();
|
||||
|
||||
if ((efuse_rd3 & EFUSE_RD_CHIP_VER_DIS_APP_CPU_M) == 0) {
|
||||
if (efuse_ll_get_disable_app_cpu() == 0) {
|
||||
out_info->cores = 2;
|
||||
} else {
|
||||
out_info->cores = 1;
|
||||
}
|
||||
out_info->features = CHIP_FEATURE_WIFI_BGN;
|
||||
if ((efuse_rd3 & EFUSE_RD_CHIP_VER_DIS_BT_M) == 0) {
|
||||
if (efuse_ll_get_disable_bt() == 0) {
|
||||
out_info->features |= CHIP_FEATURE_BT | CHIP_FEATURE_BLE;
|
||||
}
|
||||
uint32_t package = esp_efuse_get_pkg_ver();
|
||||
@@ -177,6 +179,6 @@ void esp_chip_info(esp_chip_info_t* out_info)
|
||||
#if CONFIG_ESP32_ECO3_CACHE_LOCK_FIX
|
||||
inline bool soc_has_cache_lock_bug(void)
|
||||
{
|
||||
return (esp_efuse_get_chip_ver() == 3);
|
||||
return (efuse_hal_get_major_chip_version() == 3);
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user