mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-07 17:08:49 +00:00
rename APB_CTRL ro SYS_CON
save
This commit is contained in:
committed by
Jiang Jiang Jian
parent
b59902f4d1
commit
1080e4f6a2
@@ -15,7 +15,7 @@
|
||||
#include "soc/efuse_periph.h"
|
||||
#include "bootloader_random.h"
|
||||
#include "sys/param.h"
|
||||
#include "soc/apb_ctrl_reg.h"
|
||||
#include "soc/syscon_reg.h"
|
||||
|
||||
const static char *TAG = "efuse";
|
||||
|
||||
@@ -27,7 +27,7 @@ uint8_t esp_efuse_get_chip_ver(void)
|
||||
uint8_t eco_bit0, eco_bit1, eco_bit2;
|
||||
esp_efuse_read_field_blob(ESP_EFUSE_CHIP_VER_REV1, &eco_bit0, 1);
|
||||
esp_efuse_read_field_blob(ESP_EFUSE_CHIP_VER_REV2, &eco_bit1, 1);
|
||||
eco_bit2 = (REG_READ(APB_CTRL_DATE_REG) & 0x80000000) >> 31;
|
||||
eco_bit2 = (REG_READ(SYSCON_DATE_REG) & 0x80000000) >> 31;
|
||||
uint32_t combine_value = (eco_bit2 << 2) | (eco_bit1 << 1) | eco_bit0;
|
||||
uint8_t chip_ver = 0;
|
||||
switch (combine_value) {
|
||||
|
||||
Reference in New Issue
Block a user