efuse_hal.c 558 B

123456789101112131415161718192021222324
  1. /*
  2. * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #include "sdkconfig.h"
  7. #include <sys/param.h>
  8. #include "soc/soc_caps.h"
  9. #include "hal/efuse_ll.h"
  10. #include "hal/assert.h"
  11. #include "hal/efuse_hal.h"
  12. void efuse_hal_get_mac(uint8_t *mac)
  13. {
  14. *((uint32_t*)&mac[0]) = efuse_ll_get_mac0();
  15. *((uint16_t*)&mac[4]) = (uint16_t) efuse_ll_get_mac1();
  16. }
  17. uint32_t efuse_hal_chip_revision(void)
  18. {
  19. return efuse_hal_get_major_chip_version() * 100 + efuse_hal_get_minor_chip_version();
  20. }