mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
spi_flash: refactor spi_flash.h to decline duplicated code
This commit is contained in:
@@ -19,26 +19,24 @@
|
||||
#include "esp_attr.h"
|
||||
#include "esp_spi_flash.h"
|
||||
#include "esp_flash_encrypt.h"
|
||||
#include "esp_rom_spiflash.h"
|
||||
#include "esp_log.h"
|
||||
#include "cache_utils.h"
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
#include "soc/dport_reg.h"
|
||||
#include "esp32/rom/cache.h"
|
||||
#include "esp32/rom/spi_flash.h"
|
||||
#include "esp32/spiram.h"
|
||||
#include "soc/mmu.h"
|
||||
// TODO: IDF-3821
|
||||
#define INVALID_PHY_PAGE 0xffff
|
||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||
#include "esp32s2/rom/cache.h"
|
||||
#include "esp32s2/rom/spi_flash.h"
|
||||
#include "esp32s2/spiram.h"
|
||||
#include "soc/extmem_reg.h"
|
||||
#include "soc/cache_memory.h"
|
||||
#include "soc/mmu.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32S3
|
||||
#include "esp32s3/rom/spi_flash.h"
|
||||
#include "esp32s3/rom/cache.h"
|
||||
#include "esp32s3/spiram.h"
|
||||
#include "soc/extmem_reg.h"
|
||||
@@ -46,12 +44,10 @@
|
||||
#include "soc/mmu.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
#include "esp32c3/rom/cache.h"
|
||||
#include "esp32c3/rom/spi_flash.h"
|
||||
#include "soc/cache_memory.h"
|
||||
#include "soc/mmu.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||
#include "esp32h2/rom/cache.h"
|
||||
#include "esp32h2/rom/spi_flash.h"
|
||||
#include "soc/cache_memory.h"
|
||||
#include "soc/mmu.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP8684
|
||||
|
Reference in New Issue
Block a user