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:
Cao Sen Miao
2020-11-27 19:09:40 +08:00
committed by Cao Senmiao
parent 31ba414c4d
commit 78a2dbe42a
11 changed files with 93 additions and 2 deletions

View File

@@ -18,6 +18,7 @@
Suitable for use with spi_flash_hal_common_command static function.
*/
#define CMD_RDID 0x9F
#define CMD_RDUID 0x4B /* Read the flash unique ID*/
#define CMD_WRSR 0x01
#define SR_WIP (1<<0) /* Status register write-in-progress bit */
#define SR_WREN (1<<1) /* Status register write enable bit */