mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-19 07:55:54 +00:00
esp_flash: fix the set/get write protection functions
Add support for get write protection support, fixed the duplicated set_write_protection link. All the write_protection check in the top layer are removed. The lower levels (chip) should ensure to disable write protection before the operation start.
This commit is contained in:
@@ -160,8 +160,6 @@ esp_err_t esp_flash_get_chip_write_protect(esp_flash_t *chip, bool *write_protec
|
||||
* @note Correct behaviour of this function depends on the SPI flash chip model and chip_drv in use (via the 'chip->drv'
|
||||
* field).
|
||||
*
|
||||
* If write protection is enabled, destructive operations will fail with ESP_ERR_FLASH_PROTECTED.
|
||||
*
|
||||
* Some SPI flash chips may require a power cycle before write protect status can be cleared. Otherwise,
|
||||
* write protection can be removed via a follow-up call to this function.
|
||||
*
|
||||
|
Reference in New Issue
Block a user