mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
spi_flash: Remove legacy spi_flash drivers
This commit is contained in:
@@ -180,7 +180,7 @@ esp_err_t esp_flash_erase_chip(esp_flash_t *chip);
|
||||
|
||||
/** @brief Erase a region of the flash chip
|
||||
*
|
||||
* @param chip Pointer to identify flash chip. Must have been successfully initialised via esp_flash_init()
|
||||
* @param chip Pointer to identify flash chip. If NULL, esp_flash_default_chip is substituted. Must have been successfully initialised via esp_flash_init()
|
||||
* @param start Address to start erasing flash. Must be sector aligned.
|
||||
* @param len Length of region to erase. Must also be sector aligned.
|
||||
*
|
||||
@@ -200,7 +200,7 @@ esp_err_t esp_flash_erase_region(esp_flash_t *chip, uint32_t start, uint32_t len
|
||||
|
||||
/** @brief Read if the entire chip is write protected
|
||||
*
|
||||
* @param chip Pointer to identify flash chip. Must have been successfully initialised via esp_flash_init()
|
||||
* @param chip Pointer to identify flash chip. If NULL, esp_flash_default_chip is substituted. Must have been successfully initialised via esp_flash_init()
|
||||
* @param[out] write_protected Pointer to boolean, set to the value of the write protect flag.
|
||||
*
|
||||
* @note A correct result for this flag depends on the SPI flash chip model and chip_drv in use (via the 'chip->drv'
|
||||
@@ -212,7 +212,7 @@ esp_err_t esp_flash_get_chip_write_protect(esp_flash_t *chip, bool *write_protec
|
||||
|
||||
/** @brief Set write protection for the SPI flash chip
|
||||
*
|
||||
* @param chip Pointer to identify flash chip. Must have been successfully initialised via esp_flash_init()
|
||||
* @param chip Pointer to identify flash chip. If NULL, esp_flash_default_chip is substituted. Must have been successfully initialised via esp_flash_init()
|
||||
* @param write_protect Boolean value for the write protect flag
|
||||
*
|
||||
* @note Correct behaviour of this function depends on the SPI flash chip model and chip_drv in use (via the 'chip->drv'
|
||||
@@ -272,7 +272,7 @@ esp_err_t esp_flash_set_protected_region(esp_flash_t *chip, const esp_flash_regi
|
||||
|
||||
/** @brief Read data from the SPI flash chip
|
||||
*
|
||||
* @param chip Pointer to identify flash chip. Must have been successfully initialised via esp_flash_init()
|
||||
* @param chip Pointer to identify flash chip. If NULL, esp_flash_default_chip is substituted. Must have been successfully initialised via esp_flash_init()
|
||||
* @param buffer Pointer to a buffer where the data will be read. To get better performance, this should be in the DRAM and word aligned.
|
||||
* @param address Address on flash to read from. Must be less than chip->size field.
|
||||
* @param length Length (in bytes) of data to read.
|
||||
@@ -291,7 +291,7 @@ esp_err_t esp_flash_read(esp_flash_t *chip, void *buffer, uint32_t address, uint
|
||||
|
||||
/** @brief Write data to the SPI flash chip
|
||||
*
|
||||
* @param chip Pointer to identify flash chip. Must have been successfully initialised via esp_flash_init()
|
||||
* @param chip Pointer to identify flash chip. If NULL, esp_flash_default_chip is substituted. Must have been successfully initialised via esp_flash_init()
|
||||
* @param address Address on flash to write to. Must be previously erased (SPI NOR flash can only write bits 1->0).
|
||||
* @param buffer Pointer to a buffer with the data to write. To get better performance, this should be in the DRAM and word aligned.
|
||||
* @param length Length (in bytes) of data to write.
|
||||
@@ -318,7 +318,6 @@ esp_err_t esp_flash_write(esp_flash_t *chip, const void *buffer, uint32_t addres
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_NOT_SUPPORTED: encrypted write not supported for this chip.
|
||||
* - ESP_ERR_INVALID_ARG: Either the address, buffer or length is invalid.
|
||||
* - or other flash error code from spi_flash_write_encrypted().
|
||||
*/
|
||||
esp_err_t esp_flash_write_encrypted(esp_flash_t *chip, uint32_t address, const void *buffer, uint32_t length);
|
||||
|
||||
@@ -332,7 +331,6 @@ esp_err_t esp_flash_write_encrypted(esp_flash_t *chip, uint32_t address, const v
|
||||
* @return
|
||||
* - ESP_OK: on success
|
||||
* - ESP_ERR_NOT_SUPPORTED: encrypted read not supported for this chip.
|
||||
* - or other flash error code from spi_flash_read_encrypted().
|
||||
*/
|
||||
esp_err_t esp_flash_read_encrypted(esp_flash_t *chip, uint32_t address, void *out_buffer, uint32_t length);
|
||||
|
||||
|
Reference in New Issue
Block a user