Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# spiflash.h File Reference

## Detailed Description

Definition in file spiflash.h.

`#include "global.h"`

Go to the source code of this file.

## Defines
#define | SPIFLASH_CMD_WREN 0x06
#define | SPIFLASH_CMD_WRDI 0x04
#define | SPIFLASH_CMD_RDID 0x9F
#define | SPIFLASH_CMD_RDSR 0x05
#define | SPIFLASH_CMD_WRSR 0x01
#define | SPIFLASH_CMD_READ 0x03
#define | SPIFLASH_CMD_FASTREAD 0x0B
#define | SPIFLASH_CMD_PAGEPROG 0x02
#define | SPIFLASH_CMD_SECTERASE 0xD8
#define | SPIFLASH_CMD_CHIPERASE 0xC7
#define | SPIFLASH_STATUS_BUSY 0x01
#define | SPIFLASH_STATUS_WEN 0x02
#define | SPIFLASH_STATUS_BP0 0x04
#define | SPIFLASH_STATUS_BP1 0x08
#define | SPIFLASH_STATUS_BP2 0x10
#define | SPIFLASH_STATUS_WPEN 0x80
#define | SPIFLASH_PAGESIZE 256
## Functions
void | spiflashInit (void)
unsigned short | spiflashGetID (void)
void | spiflashChipErase (void)
void | spiflashRead (unsigned long addr, unsigned long nbytes, unsigned char *data)
void | spiflashWrite (unsigned long addr, unsigned long nbytes, unsigned char *data)