bootloader_efuse_esp32c3.c 555 B

1234567891011121314151617181920
  1. /*
  2. * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #include <stdint.h>
  7. #include "soc/efuse_reg.h"
  8. uint8_t bootloader_common_get_chip_revision(void)
  9. {
  10. // should return the same value as esp_efuse_get_chip_ver()
  11. return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_WAFER_VERSION);
  12. }
  13. uint32_t bootloader_common_get_chip_ver_pkg(void)
  14. {
  15. // should return the same value as esp_efuse_get_pkg_ver()
  16. return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_PKG_VERSION);
  17. }