refactor(flash_enc): move esp_flash_encryption_enabled() to efuse component

This commit is contained in:
Chen Jichang
2026-02-05 11:42:08 +08:00
committed by Chen Ji Chang
parent 0ac402217c
commit b8c527a87c
53 changed files with 139 additions and 131 deletions
+2 -2
View File
@@ -26,7 +26,7 @@
#include "esp_partition.h"
#include "esp_flash.h"
#if !CONFIG_IDF_TARGET_LINUX
#include "esp_flash_encrypt.h"
#include "esp_efuse.h"
#endif
#include "spi_flash_mmap.h"
#include "esp_log.h"
@@ -80,7 +80,7 @@ static bool is_partition_encrypted(bool encryption_config, esp_partition_type_t
return false;
#else
bool ret_encrypted = encryption_config;
if (!esp_flash_encryption_enabled()) {
if (!esp_efuse_is_flash_encryption_enabled()) {
/* If flash encryption is not turned on, no partitions should be treated as encrypted */
ret_encrypted = false;
} else if (type == ESP_PARTITION_TYPE_APP