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
@@ -244,6 +244,18 @@ esp_err_t spi_flash_chip_generic_set_io_mode(esp_flash_t *chip);
|
||||
*/
|
||||
esp_err_t spi_flash_chip_generic_get_io_mode(esp_flash_t *chip, esp_flash_io_mode_t* out_quad_mode);
|
||||
|
||||
/**
|
||||
* @brief Read the chip unique ID.
|
||||
*
|
||||
* @param chip Pointer to SPI flash chip to use. If NULL, esp_flash_default_chip is substituted.
|
||||
* @param flash_unique_id Pointer to store output unique id.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK if success
|
||||
* - ESP_ERR_NOT_SUPPORTED if the chip doesn't support read id.
|
||||
*/
|
||||
esp_err_t spi_flash_chip_generic_read_unique_id(esp_flash_t *chip, uint64_t* flash_unique_id);
|
||||
|
||||
/**
|
||||
* Generic SPI flash chip_drv, uses all the above functions for its operations.
|
||||
* In default autodetection, this is used as a catchall if a more specific
|
||||
|
Reference in New Issue
Block a user