1/*******************************************************************************
2 *
3 * Filename: spi_flash.h
4 *
5 * Definition of flash control routines supporting AT45DB161B
6 *
7 * Revision information:
8 *
9 * 17JAN2005 kb_admin initial creation
10 *
11 * BEGIN_KBDD_BLOCK
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
17 * only.
18 * END_BLOCK
19 *
20 * $FreeBSD: head/sys/boot/arm/at91/libat91/spi_flash.h 161197 2006-08-10 18:14:35Z imp $
21 ******************************************************************************/
22
23#ifndef _SPI_FLASH_H_
24#define _SPI_FLASH_H_
25
26typedef struct {
27 char *tx_cmd;
28 unsigned tx_cmd_size;
--- 6 unchanged lines hidden (view full) ---
35} spiCommand_t;
36
37void SPI_ReadFlash(unsigned flash_addr, char *dest_addr, unsigned size);
38void SPI_WriteFlash(unsigned flash_addr, char *dest_addr, unsigned size);
39void SPI_InitFlash(void);
40
41void SPI_GetId(unsigned *id);
42
43#define FLASH_PAGE_SIZE 1056
44
45// Flash commands
46
47#define CONTINUOUS_ARRAY_READ 0xE8
48#define CONTINUOUS_ARRAY_READ_HF 0x0B
49#define CONTINUOUS_ARRAY_READ_LF 0x03
50#define STATUS_REGISTER_READ 0xD7
51#define PROGRAM_THROUGH_BUFFER 0x82
52#define MANUFACTURER_ID 0x9F
53
54#endif
2 *
3 * Filename: spi_flash.h
4 *
5 * Definition of flash control routines supporting AT45DB161B
6 *
7 * Revision information:
8 *
9 * 17JAN2005 kb_admin initial creation
10 *
11 * BEGIN_KBDD_BLOCK
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
17 * only.
18 * END_BLOCK
19 *
20 * $FreeBSD: head/sys/boot/arm/at91/libat91/spi_flash.h 161197 2006-08-10 18:14:35Z imp $
21 ******************************************************************************/
22
23#ifndef _SPI_FLASH_H_
24#define _SPI_FLASH_H_
25
26typedef struct {
27 char *tx_cmd;
28 unsigned tx_cmd_size;
--- 6 unchanged lines hidden (view full) ---
35} spiCommand_t;
36
37void SPI_ReadFlash(unsigned flash_addr, char *dest_addr, unsigned size);
38void SPI_WriteFlash(unsigned flash_addr, char *dest_addr, unsigned size);
39void SPI_InitFlash(void);
40
41void SPI_GetId(unsigned *id);
42
43#define FLASH_PAGE_SIZE 1056
44
45// Flash commands
46
47#define CONTINUOUS_ARRAY_READ 0xE8
48#define CONTINUOUS_ARRAY_READ_HF 0x0B
49#define CONTINUOUS_ARRAY_READ_LF 0x03
50#define STATUS_REGISTER_READ 0xD7
51#define PROGRAM_THROUGH_BUFFER 0x82
52#define MANUFACTURER_ID 0x9F
53
54#endif