2010-01-22 14:22:31 +08:00
|
|
|
|
#ifndef SPI_FLASH_H_INCLUDED
|
|
|
|
|
#define SPI_FLASH_H_INCLUDED
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
user for AT45DB161.
|
|
|
|
|
copy form : http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=737106
|
|
|
|
|
thanks to gxlujd.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#define AT45DB_BUFFER_1_WRITE 0x84 /* д<><D0B4><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AT45DB_BUFFER_2_WRITE 0x87 /* д<><D0B4><EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AT45DB_BUFFER_1_READ 0xD4 /* <20><>ȡ<EFBFBD><C8A1>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AT45DB_BUFFER_2_READ 0xD6 /* <20><>ȡ<EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AT45DB_B1_TO_MM_PAGE_PROG_WITH_ERASE 0x83 /* <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>洢<EFBFBD><E6B4A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ<C4A3><CABD>*/
|
|
|
|
|
#define AT45DB_B2_TO_MM_PAGE_PROG_WITH_ERASE 0x86 /* <20><><EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>洢<EFBFBD><E6B4A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ<C4A3><CABD>*/
|
|
|
|
|
#define AT45DB_MM_PAGE_TO_B1_XFER 0x53 /* <20><><EFBFBD><EFBFBD><EFBFBD>洢<EFBFBD><E6B4A2><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>ҳ<EFBFBD><D2B3><EFBFBD>ݼ<EFBFBD><DDBC>ص<EFBFBD><D8B5><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AT45DB_MM_PAGE_TO_B2_XFER 0x55 /* <20><><EFBFBD><EFBFBD><EFBFBD>洢<EFBFBD><E6B4A2><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>ҳ<EFBFBD><D2B3><EFBFBD>ݼ<EFBFBD><DDBC>ص<EFBFBD><D8B5>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AT45DB_PAGE_ERASE 0x81 /* ҳɾ<D2B3><C9BE><EFBFBD><EFBFBD>ÿҳ512/528<32>ֽڣ<D6BD> */
|
|
|
|
|
#define AT45DB_SECTOR_ERASE 0x7C /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD>128K<38>ֽڣ<D6BD>*/
|
|
|
|
|
#define AT45DB_READ_STATE_REGISTER 0xD7 /* <20><>ȡ״̬<D7B4>Ĵ<EFBFBD><C4B4><EFBFBD> */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern void rt_hw_spi_flash_init(void);
|
|
|
|
|
|
|
|
|
|
#endif /* SPI_FLASH_H_INCLUDED */
|