mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 04:25:32 +00:00
spi_flash: add a new function to support read the unique id
Close https://github.com/espressif/esp-idf/pull/4255
This commit is contained in:

committed by
Cao Senmiao

parent
31ba414c4d
commit
78a2dbe42a
@@ -156,6 +156,19 @@ esp_err_t esp_flash_read_id(esp_flash_t *chip, uint32_t *out_id);
|
||||
*/
|
||||
esp_err_t esp_flash_get_size(esp_flash_t *chip, uint32_t *out_size);
|
||||
|
||||
/** @brief Read flash unique ID via the common "RDUID" SPI flash command.
|
||||
*
|
||||
* @param chip Pointer to identify flash chip. Must have been successfully initialised via esp_flash_init().
|
||||
* @param[out] out_id Pointer to receive unique ID value.
|
||||
*
|
||||
* ID is a 64-bit value.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success, or a flash error code if operation failed.
|
||||
* - ESP_ERR_NOT_SUPPORTED if the chip doesn't support read id.
|
||||
*/
|
||||
esp_err_t esp_flash_read_unique_chip_id(esp_flash_t *chip, uint64_t *out_id);
|
||||
|
||||
/** @brief Erase flash chip contents
|
||||
*
|
||||
* @param chip Pointer to identify flash chip. Must have been successfully initialised via esp_flash_init()
|
||||
|
Reference in New Issue
Block a user