mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp32: get_chip_info_esp32() return correct model number
out_info->model was zeroed by memset Merges https://github.com/espressif/esp-idf/pull/1760
This commit is contained in:
parent
97c6a94a03
commit
9f39411e80
@ -379,9 +379,10 @@ const char* esp_get_idf_version(void)
|
||||
|
||||
static void get_chip_info_esp32(esp_chip_info_t* out_info)
|
||||
{
|
||||
out_info->model = CHIP_ESP32;
|
||||
uint32_t reg = REG_READ(EFUSE_BLK0_RDATA3_REG);
|
||||
memset(out_info, 0, sizeof(*out_info));
|
||||
|
||||
out_info->model = CHIP_ESP32;
|
||||
if ((reg & EFUSE_RD_CHIP_VER_REV1_M) != 0) {
|
||||
out_info->revision = 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user