You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
564 B
19 lines
564 B
8 years ago
|
#pragma once
|
||
|
|
||
|
#define SPI_FLASH_UNIQ_ID 0x4b
|
||
|
#define SPI_FLASH_MFR_DEV_ID 0x90
|
||
|
#define SPI_FLASH_JEDEC_ID 0x9f
|
||
|
|
||
|
#define SPI_FLASH_READ 0x03
|
||
|
|
||
|
#define SPI_FLASH_PAGE_PROGRAM 0x02
|
||
|
#define SPI_FLASH_WRITE_ENABLE 0x06
|
||
|
#define SPI_FLASH_WRITE_DISABLE 0x04
|
||
|
|
||
|
#define SPI_FLASH_ERASE_4K 0x20
|
||
|
#define SPI_FLASH_ERASE_32K 0x52
|
||
|
#define SPI_FLASH_ERASE_64K 0xd8
|
||
|
#define SPI_FLASH_ERASE_CHIP 0xc7
|
||
|
|
||
|
#define SPI_FLASH_SIZE(x) (1 << (x))
|