/* * SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */#include"esp_efuse.h"#include"esp_efuse_utility.h"#include"esp_efuse_table.h"#include"stdlib.h"#include"esp_types.h"#include"assert.h"#include"esp_err.h"#include"esp_log.h"#include"soc/efuse_periph.h"#include"soc/chip_revision.h"#include"hal/efuse_hal.h"#include"sys/param.h"#include"soc/syscon_reg.h"13 includesconststaticchar*TAG="efuse";// Contains functions that provide access to efuse fields which are often used in IDF.// Returns chip package from efuseuint32_tesp_efuse_get_pkg_ver(void){uint32_tpkg_ver=0;esp_efuse_read_field_blob(ESP_EFUSE_CHIP_VER_PKG,&pkg_ver,4);returnpkg_ver;}{ ... }// Disable BASIC ROM Console via efusevoidesp_efuse_disable_basic_rom_console(void){if(!esp_efuse_read_field_bit(ESP_EFUSE_CONSOLE_DEBUG_DISABLE)){esp_efuse_write_field_cnt(ESP_EFUSE_CONSOLE_DEBUG_DISABLE,1);ESP_LOGI(TAG,"Disable BASIC ROM Console fallback via efuse...");}{...}}{ ... }esp_err_tesp_efuse_disable_rom_download_mode(void){#ifCONFIG_ESP32_REV_MIN_FULL<300/* Check if we support this revision at all */if(!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(),300)){returnESP_ERR_NOT_SUPPORTED;}{...}#endif/* ... */if(esp_efuse_read_field_bit(ESP_EFUSE_UART_DOWNLOAD_DIS)){returnESP_OK;}{...}/* WR_DIS_FLASH_CRYPT_CNT also covers UART_DOWNLOAD_DIS on ESP32 */if(esp_efuse_read_field_bit(ESP_EFUSE_WR_DIS_FLASH_CRYPT_CNT)){returnESP_ERR_INVALID_STATE;}{...}returnesp_efuse_write_field_bit(ESP_EFUSE_UART_DOWNLOAD_DIS);}{ ... }esp_err_tesp_efuse_set_rom_log_scheme(esp_efuse_rom_log_scheme_tlog_scheme){returnESP_ERR_NOT_SUPPORTED;}{ ... }
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.