mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
spi_flash: Remove legacy spi_flash drivers
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#include "esp_flash_internal.h"
|
||||
#include "esp_rom_gpio.h"
|
||||
#include "esp_private/spi_flash_os.h"
|
||||
#include "esp_private/cache_utils.h"
|
||||
#include "esp_spi_flash_counters.h"
|
||||
#include "esp_rom_spiflash.h"
|
||||
|
||||
__attribute__((unused)) static const char TAG[] = "spi_flash";
|
||||
@@ -29,8 +31,6 @@ __attribute__((unused)) static const char TAG[] = "spi_flash";
|
||||
esp_flash_t *esp_flash_default_chip = NULL;
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SPI_FLASH_USE_LEGACY_IMPL
|
||||
|
||||
#if defined CONFIG_ESPTOOLPY_FLASHFREQ_120M
|
||||
#define DEFAULT_FLASH_SPEED 120
|
||||
#elif defined CONFIG_ESPTOOLPY_FLASHFREQ_80M
|
||||
@@ -387,6 +387,11 @@ esp_err_t esp_flash_init_default_chip(void)
|
||||
esp_err_t esp_flash_app_init(void)
|
||||
{
|
||||
esp_err_t err = ESP_OK;
|
||||
spi_flash_init_lock();
|
||||
spi_flash_guard_set(&g_flash_guard_default_ops);
|
||||
#if CONFIG_SPI_FLASH_ENABLE_COUNTERS
|
||||
spi_flash_reset_counters();
|
||||
#endif
|
||||
#if CONFIG_SPI_FLASH_SHARE_SPI1_BUS
|
||||
err = esp_flash_init_main_bus_lock();
|
||||
if (err != ESP_OK) return err;
|
||||
@@ -394,5 +399,3 @@ esp_err_t esp_flash_app_init(void)
|
||||
err = esp_flash_app_enable_os_functions(&default_chip);
|
||||
return err;
|
||||
}
|
||||
|
||||
#endif //!CONFIG_SPI_FLASH_USE_LEGACY_IMPL
|
||||
|
Reference in New Issue
Block a user