mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-26 02:00:26 +00:00
spi_flash: Add auto suspend mode on esp32c3
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "esp_log.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_flash_internal.h"
|
||||
#include "spi_flash_defs.h"
|
||||
|
||||
static const char TAG[] = "spi_flash";
|
||||
|
||||
@@ -173,9 +174,6 @@ bool esp_flash_chip_driver_initialized(const esp_flash_t *chip)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_FLASH_AUTO_SUSPEND
|
||||
spi_flash_ll_auto_suspend_init(spi_flash_ll_get_hw(SPI_HOST), val);
|
||||
#endif
|
||||
esp_err_t IRAM_ATTR esp_flash_init(esp_flash_t *chip)
|
||||
{
|
||||
// Chip init flow
|
||||
@@ -835,6 +833,12 @@ IRAM_ATTR esp_err_t esp_flash_set_io_mode(esp_flash_t* chip, bool qe)
|
||||
}
|
||||
#endif //CONFIG_SPI_FLASH_ROM_IMPL
|
||||
|
||||
//init suspend mode cmd, uses internal.
|
||||
esp_err_t esp_flash_suspend_cmd_init(esp_flash_t* chip)
|
||||
{
|
||||
return chip->chip_drv->sus_setup(chip);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_SPI_FLASH_USE_LEGACY_IMPL
|
||||
esp_err_t esp_flash_app_disable_protect(bool disable)
|
||||
{
|
||||
|
Reference in New Issue
Block a user