inc/spi_flash.h File Reference

#include <cdefBF527.h>

Include dependency graph for spi_flash.h:

This graph shows which files directly or indirectly include this file:


Defines

#define COMMON_SPI_SETTINGS   (SPE|MSTR)
#define TIMOD01   (0x01)
#define FLASH_BAUD_RATE_DIVISOR   3
#define SECTOR_SIZE   262144
#define SECTORS_NUM   64
#define PAGE_SIZE   256
#define SPI_WREN   (0x06)
#define SPI_WRDI   (0x04)
#define SPI_RDID   (0x9F)
#define SPI_RDSR   (0x05)
#define SPI_WRSR   (0x01)
#define SPI_READ   (0x03)
#define SPI_FAST_READ   (0x0B)
#define SPI_PP   (0x02)
#define SPI_SE   (0xD8)
#define SPI_BE   (0xC7)
#define WIP   (0x1)
#define WEL   (0x2)
#define CMD_S25FLXX_DP   0xb9
#define CMD_S25FLXX_RES   0xab
#define FLASH_DELAY   300
#define TIMEOUT   35000*128
#define NO_ERR   0
#define EXCEED_PAGE_SIZE   -1
#define POLL_TIMEOUT   -2
#define INVALID_SECTOR   -3
#define INVALID_DATA   -4
#define STMICRO_NUMONYX   0x20
#define SPANSION   0x01

Functions

int GetCodes (unsigned char *, unsigned char)
int EraseFlash (void)
int EraseSector (unsigned long ulAddr)
int EraseSectorNum (int nBlock)
int memoryPageWrite (unsigned long ulStartAdd, unsigned long length, unsigned char *data_buf)
int memoryRead (unsigned long ulStartAdd, unsigned long length, unsigned char *data_buf)

Define Documentation

#define CMD_S25FLXX_DP   0xb9

#define CMD_S25FLXX_RES   0xab

#define COMMON_SPI_SETTINGS   (SPE|MSTR)

#define EXCEED_PAGE_SIZE   -1

#define FLASH_BAUD_RATE_DIVISOR   3

#define FLASH_DELAY   300

#define INVALID_DATA   -4

#define INVALID_SECTOR   -3

#define NO_ERR   0

#define PAGE_SIZE   256

#define POLL_TIMEOUT   -2

#define SECTOR_SIZE   262144

#define SECTORS_NUM   64

#define SPANSION   0x01

#define SPI_BE   (0xC7)

#define SPI_FAST_READ   (0x0B)

#define SPI_PP   (0x02)

#define SPI_RDID   (0x9F)

#define SPI_RDSR   (0x05)

#define SPI_READ   (0x03)

#define SPI_SE   (0xD8)

#define SPI_WRDI   (0x04)

#define SPI_WREN   (0x06)

#define SPI_WRSR   (0x01)

#define STMICRO_NUMONYX   0x20

#define TIMEOUT   35000*128

#define TIMOD01   (0x01)

#define WEL   (0x2)

#define WIP   (0x1)


Function Documentation

int EraseFlash ( void   ) 

int EraseSector ( unsigned long  ulAddr  ) 

int EraseSectorNum ( int  nBlock  ) 

int GetCodes ( unsigned char *  ,
unsigned  char 
)

int memoryPageWrite ( unsigned long  ulStartAdd,
unsigned long  length,
unsigned char *  data_buf 
)

int memoryRead ( unsigned long  ulStartAdd,
unsigned long  length,
unsigned char *  data_buf 
)


Generated on 3 Mar 2014 for PAL bare-c Library by  doxygen 1.4.7