efuse/esp32: Expands PKG_VER from 3 bit to 4 bits

Closes: IDF-1919
This commit is contained in:
KonstantinKondrashov
2020-08-05 14:56:01 +08:00
committed by bot
parent 6d14bdf068
commit 2373f115fc
14 changed files with 81 additions and 33 deletions

View File

@@ -15,6 +15,7 @@
#include "sdkconfig.h"
#include "bootloader_clock.h"
#include "bootloader_common.h"
#include "soc/efuse_reg.h"
uint8_t bootloader_common_get_chip_revision(void)
{
@@ -22,3 +23,9 @@ uint8_t bootloader_common_get_chip_revision(void)
/* No other revisions for ESP32-S2 */
return 0;
}
uint32_t bootloader_common_get_chip_ver_pkg(void)
{
// should return the same value as esp_efuse_get_pkg_ver()
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_PKG_VERSION);
}