mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-27 18:32:54 +00:00
spi_flash: Support select flash mode automatically at run time(Quad flash or Octal flash)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <esp_flash_encrypt.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "hal/efuse_ll.h"
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
# include "soc/spi_struct.h"
|
||||
@@ -780,3 +781,12 @@ esp_err_t IRAM_ATTR bootloader_flash_reset_chip(void)
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
bool bootloader_flash_is_octal_mode_enabled(void)
|
||||
{
|
||||
#if SOC_SPI_MEM_SUPPORT_OPI_MODE
|
||||
return efuse_ll_get_flash_type();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user