esp_efuse.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /**
  11. * @brief Type of eFuse blocks ESP8684
  12. */
  13. typedef enum {
  14. EFUSE_BLK0 = 0, /**< Number of eFuse BLOCK0. REPEAT_DATA */
  15. EFUSE_BLK1 = 1, /**< Number of eFuse BLOCK1. SYS_DATA_PART0 */
  16. EFUSE_BLK_SYS_DATA_PART0 = 2, /**< Number of eFuse BLOCK2. SYS_DATA_PART0 */
  17. EFUSE_BLK2 = 2, /**< Number of eFuse BLOCK2. SYS_DATA_PART1 */
  18. EFUSE_BLK_SYS_DATA_PART1 = 2, /**< Number of eFuse BLOCK2. SYS_DATA_PART1 */
  19. EFUSE_BLK3 = 3, /**< Number of eFuse BLOCK3. KEY0*/
  20. EFUSE_BLK_KEY0 = 3, /**< Number of eFuse BLOCK3. KEY0*/
  21. EFUSE_BLK_KEY_MAX = 4,
  22. EFUSE_BLK_MAX = 4,
  23. } esp_efuse_block_t;
  24. /**
  25. * @brief Type of coding scheme
  26. */
  27. typedef enum {
  28. EFUSE_CODING_SCHEME_NONE = 0, /**< None */
  29. EFUSE_CODING_SCHEME_RS = 3, /**< Reed-Solomon coding */
  30. } esp_efuse_coding_scheme_t;
  31. /** For ESP8684, there's no key purpose region for efuse keys, In order to maintain
  32. * compatibility with the previous apis, we should set the parameter of 'ets_efuse_purpose_t'
  33. * as default value ETS_EFUSE_KEY_PURPOSE_INVALID.
  34. * (In fact, this parameter can be any value, the api in the rom will not process key_purpose region)
  35. */
  36. typedef enum {
  37. ESP_EFUSE_KEY_PURPOSE_INVALID = -1,
  38. ESP_EFUSE_KEY_PURPOSE_USER = 0,
  39. ESP_EFUSE_KEY_PURPOSE_FLASH_ENCRYPTION = 1,
  40. ESP_EFUSE_KEY_PURPOSE_SECURE_BOOT_V1 = 2,
  41. } esp_efuse_purpose_t;
  42. #ifdef __cplusplus
  43. }
  44. #endif