mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-03 07:38:00 +00:00
spi_flash: Add auto suspend mode on esp32c3
This commit is contained in:
@@ -255,24 +255,6 @@ extern const spi_flash_chip_t esp_flash_chip_generic;
|
||||
* Utilities
|
||||
*******************************************************************************/
|
||||
|
||||
/**
|
||||
* @brief Wait for the SPI host hardware state machine to be idle.
|
||||
*
|
||||
* This isn't a flash chip_drv operation, but it's called by
|
||||
* spi_flash_chip_generic_wait_idle() and may be useful when implementing
|
||||
* alternative drivers.
|
||||
*
|
||||
* timeout_us will be decremented if the function needs to wait until the host hardware is idle.
|
||||
*
|
||||
* @param chip Pointer to SPI flash chip to use. If NULL, esp_flash_default_chip is substituted.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK if success
|
||||
* - ESP_ERR_TIMEOUT if not idle before timeout
|
||||
* - or other error passed from the ``set_write_protect`` or ``common_command`` function of host driver
|
||||
*/
|
||||
esp_err_t spi_flash_generic_wait_host_idle(esp_flash_t *chip, uint32_t *timeout_us);
|
||||
|
||||
/// Function pointer type for reading status register with QE bit.
|
||||
typedef esp_err_t (*esp_flash_rdsr_func_t)(esp_flash_t* chip, uint32_t* out_sr);
|
||||
|
||||
@@ -394,5 +376,13 @@ esp_err_t spi_flash_chip_generic_config_host_io_mode(esp_flash_t *chip, bool add
|
||||
*/
|
||||
esp_err_t spi_flash_chip_generic_yield(esp_flash_t* chip, uint32_t wip);
|
||||
|
||||
/**
|
||||
* @brief Setup for flash suspend command configuration.
|
||||
*
|
||||
* @param chip Pointer to SPI flash chip to use. If NULL, esp_flash_default_chip is substituted.
|
||||
* @return ESP_OK
|
||||
*/
|
||||
esp_err_t spi_flash_chip_generic_suspend_cmd_conf(esp_flash_t *chip);
|
||||
|
||||
/// Default timeout configuration used by most chips
|
||||
const flash_chip_op_timeout_t spi_flash_chip_generic_timeout;
|
||||
|
||||
Reference in New Issue
Block a user