esp_efuse.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Copyright 2019 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #pragma once
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /**
  19. * @brief Type of eFuse blocks ESP32S2
  20. */
  21. typedef enum {
  22. EFUSE_BLK0 = 0, /**< Number of eFuse BLOCK0. REPEAT_DATA */
  23. EFUSE_BLK1 = 1, /**< Number of eFuse BLOCK1. MAC_SPI_8M_SYS */
  24. EFUSE_BLK2 = 2, /**< Number of eFuse BLOCK2. SYS_DATA_PART1 */
  25. EFUSE_BLK_SYS_DATA_PART1 = 2, /**< Number of eFuse BLOCK2. SYS_DATA_PART1 */
  26. EFUSE_BLK3 = 3, /**< Number of eFuse BLOCK3. USER_DATA*/
  27. EFUSE_BLK_USER_DATA = 3, /**< Number of eFuse BLOCK3. USER_DATA*/
  28. EFUSE_BLK4 = 4, /**< Number of eFuse BLOCK4. KEY0 */
  29. EFUSE_BLK_KEY0 = 4, /**< Number of eFuse BLOCK4. KEY0 */
  30. EFUSE_BLK5 = 5, /**< Number of eFuse BLOCK5. KEY1 */
  31. EFUSE_BLK_KEY1 = 5, /**< Number of eFuse BLOCK5. KEY1 */
  32. EFUSE_BLK6 = 6, /**< Number of eFuse BLOCK6. KEY2 */
  33. EFUSE_BLK_KEY2 = 6, /**< Number of eFuse BLOCK6. KEY2 */
  34. EFUSE_BLK7 = 7, /**< Number of eFuse BLOCK7. KEY3 */
  35. EFUSE_BLK_KEY3 = 7, /**< Number of eFuse BLOCK7. KEY3 */
  36. EFUSE_BLK8 = 8, /**< Number of eFuse BLOCK8. KEY4 */
  37. EFUSE_BLK_KEY4 = 8, /**< Number of eFuse BLOCK8. KEY4 */
  38. EFUSE_BLK9 = 9, /**< Number of eFuse BLOCK9. KEY5 */
  39. EFUSE_BLK_KEY5 = 9, /**< Number of eFuse BLOCK9. KEY5 */
  40. EFUSE_BLK10 = 10, /**< Number of eFuse BLOCK10. SYS_DATA_PART2 */
  41. EFUSE_BLK_SYS_DATA_PART2 = 10, /**< Number of eFuse BLOCK10. SYS_DATA_PART2 */
  42. EFUSE_BLK_MAX
  43. } esp_efuse_block_t;
  44. struct esp_efuse_desc_s;
  45. /**
  46. * @brief Given a key block in the range EFUSE_BLK_KEY0..EFUSE_BLK_KEY5, return
  47. * efuse field for setting the key purpose
  48. */
  49. const struct esp_efuse_desc_s **esp_efuse_get_purpose_field(esp_efuse_block_t block);
  50. /**
  51. * @brief Type of coding scheme
  52. */
  53. typedef enum {
  54. EFUSE_CODING_SCHEME_NONE = 0, /**< None */
  55. EFUSE_CODING_SCHEME_RS = 3, /**< Reed-Solomon coding */
  56. } esp_efuse_coding_scheme_t;
  57. #ifdef __cplusplus
  58. }
  59. #endif