1 /*******************************************************************************
3 * Filename: spi_flash.h
5 * Definition of flash control routines supporting AT45DB161B
7 * Revision information:
9 * 17JAN2005 kb_admin initial creation
12 * No warranty, expressed or implied, is included with this software. It is
13 * provided "AS IS" and no warranty of any kind including statutory or aspects
14 * relating to merchantability or fitness for any purpose is provided. All
15 * intellectual property rights of others is maintained with the respective
16 * owners. This software is not copyrighted and is intended for reference
21 ******************************************************************************/
32 unsigned tx_data_size;
34 unsigned rx_data_size;
37 void SPI_ReadFlash(unsigned flash_addr, char *dest_addr, unsigned size);
38 void SPI_WriteFlash(unsigned flash_addr, char *dest_addr, unsigned size);
39 void SPI_InitFlash(void);
41 void SPI_GetId(unsigned *id);
44 #define FLASH_PAGE_SIZE 528
46 #define FLASH_PAGE_SIZE 1056
51 #define CONTINUOUS_ARRAY_READ 0xE8
52 #define CONTINUOUS_ARRAY_READ_HF 0x0B
53 #define CONTINUOUS_ARRAY_READ_LF 0x03
54 #define STATUS_REGISTER_READ 0xD7
55 #define PROGRAM_THROUGH_BUFFER 0x82
56 #define MANUFACTURER_ID 0x9F