1 /* 2 * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include "esp_rom_efuse.h" 8 esp_crc8(uint8_t const * p,uint32_t len)9static uint8_t esp_crc8(uint8_t const * p, uint32_t len) 10 { 11 unsigned char i = 0; 12 unsigned char crc = 0; 13 14 while (len--) { 15 crc = crc ^ (*p++); 16 17 for (i = 0; i < 8; i++) { 18 if ((crc) & 0x01) { 19 crc = (crc >> 1) ^ (0x8c) ; 20 } else { 21 crc = crc >> 1; 22 } 23 } 24 } 25 26 return (crc); 27 } 28 esp_rom_efuse_mac_address_crc8(const uint8_t * data,uint32_t len)29uint8_t esp_rom_efuse_mac_address_crc8(const uint8_t *data, uint32_t len) 30 { 31 return esp_crc8(data, len); 32 } 33 esp_rom_efuse_get_flash_gpio_info(void)34uint32_t esp_rom_efuse_get_flash_gpio_info(void) 35 { 36 return 0; 37 } 38 esp_rom_efuse_get_flash_wp_gpio(void)39uint32_t esp_rom_efuse_get_flash_wp_gpio(void) 40 { 41 return 0; 42 } 43 44 #if SOC_SPI_MEM_SUPPORT_OPI_MODE esp_rom_efuse_get_opiconfig(void)45uint32_t esp_rom_efuse_get_opiconfig(void) 46 { 47 return 0; 48 } 49 #endif // SOC_SPI_MEM_SUPPORT_OPI_MODE 50 esp_rom_efuse_is_secure_boot_enabled(void)51bool esp_rom_efuse_is_secure_boot_enabled(void) 52 { 53 return false; 54 } 55