1 /* 2 * SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include "sdkconfig.h" 8 #include "bootloader_clock.h" 9 #include "bootloader_common.h" 10 #include "soc/efuse_reg.h" 11 bootloader_common_get_chip_revision(void)12uint8_t bootloader_common_get_chip_revision(void) 13 { 14 // should return the same value as esp_efuse_get_chip_ver() 15 return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_WAFER_VERSION); 16 } 17 bootloader_common_get_chip_ver_pkg(void)18uint32_t bootloader_common_get_chip_ver_pkg(void) 19 { 20 // should return the same value as esp_efuse_get_pkg_ver() 21 return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_4_REG, EFUSE_PKG_VERSION); 22 } 23