OpenOCD
spi.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  flash_device
 

Macros

#define FLASH_ID(n, re, qr, pp, es, ces, id, psize, ssize, size)
 
#define FRAM_ID(n, re, qr, pp, id, size)
 
#define SPIFLASH_BSY   0
 
#define SPIFLASH_BSY_BIT   (1 << SPIFLASH_BSY) /* WIP Bit of SPI SR */
 
#define SPIFLASH_DEF_PAGESIZE   256 /* default for non-page-oriented devices (FRAMs) */
 
#define SPIFLASH_FAST_READ   0x0B /* Fast Read */
 
#define SPIFLASH_MASS_ERASE   0xC7 /* Mass Erase */
 
#define SPIFLASH_PAGE_PROGRAM   0x02 /* Page Program */
 
#define SPIFLASH_READ   0x03 /* Normal Read */
 
#define SPIFLASH_READ_ID   0x9F /* Read Flash Identification */
 
#define SPIFLASH_READ_MID   0xAF /* Read Flash Identification, multi-io */
 
#define SPIFLASH_READ_SFDP   0x5A /* Read Serial Flash Discoverable Parameters */
 
#define SPIFLASH_READ_STATUS   0x05 /* Read Status Register */
 
#define SPIFLASH_WE   1
 
#define SPIFLASH_WE_BIT   (1 << SPIFLASH_WE) /* WEL Bit of SPI SR */
 
#define SPIFLASH_WRITE_ENABLE   0x06 /* Write Enable */
 

Variables

const struct flash_device flash_devices []
 

Macro Definition Documentation

◆ FLASH_ID

#define FLASH_ID (   n,
  re,
  qr,
  pp,
  es,
  ces,
  id,
  psize,
  ssize,
  size 
)
Value:
{ \
.name = n, \
.read_cmd = re, \
.qread_cmd = qr, \
.pprog_cmd = pp, \
.erase_cmd = es, \
.chip_erase_cmd = ces, \
.device_id = id, \
.pagesize = psize, \
.sectorsize = ssize, \
.size_in_bytes = size, \
}
size_t size
Size of the control block search area.
Definition: rtt/rtt.c:30
char id[RTT_CB_MAX_ID_LENGTH]
Control block identifier.
Definition: rtt/rtt.c:32

Definition at line 33 of file spi.h.

◆ FRAM_ID

#define FRAM_ID (   n,
  re,
  qr,
  pp,
  id,
  size 
)
Value:
{ \
.name = n, \
.read_cmd = re, \
.qread_cmd = qr, \
.pprog_cmd = pp, \
.erase_cmd = 0x00, \
.chip_erase_cmd = 0x00, \
.device_id = id, \
.pagesize = 0, \
.sectorsize = 0, \
.size_in_bytes = size, \
}

Definition at line 47 of file spi.h.

◆ SPIFLASH_BSY

#define SPIFLASH_BSY   0

Definition at line 66 of file spi.h.

◆ SPIFLASH_BSY_BIT

#define SPIFLASH_BSY_BIT   (1 << SPIFLASH_BSY) /* WIP Bit of SPI SR */

Definition at line 67 of file spi.h.

◆ SPIFLASH_DEF_PAGESIZE

#define SPIFLASH_DEF_PAGESIZE   256 /* default for non-page-oriented devices (FRAMs) */

Definition at line 82 of file spi.h.

◆ SPIFLASH_FAST_READ

#define SPIFLASH_FAST_READ   0x0B /* Fast Read */

Definition at line 77 of file spi.h.

◆ SPIFLASH_MASS_ERASE

#define SPIFLASH_MASS_ERASE   0xC7 /* Mass Erase */

Definition at line 79 of file spi.h.

◆ SPIFLASH_PAGE_PROGRAM

#define SPIFLASH_PAGE_PROGRAM   0x02 /* Page Program */

Definition at line 76 of file spi.h.

◆ SPIFLASH_READ

#define SPIFLASH_READ   0x03 /* Normal Read */

Definition at line 78 of file spi.h.

◆ SPIFLASH_READ_ID

#define SPIFLASH_READ_ID   0x9F /* Read Flash Identification */

Definition at line 72 of file spi.h.

◆ SPIFLASH_READ_MID

#define SPIFLASH_READ_MID   0xAF /* Read Flash Identification, multi-io */

Definition at line 73 of file spi.h.

◆ SPIFLASH_READ_SFDP

#define SPIFLASH_READ_SFDP   0x5A /* Read Serial Flash Discoverable Parameters */

Definition at line 80 of file spi.h.

◆ SPIFLASH_READ_STATUS

#define SPIFLASH_READ_STATUS   0x05 /* Read Status Register */

Definition at line 74 of file spi.h.

◆ SPIFLASH_WE

#define SPIFLASH_WE   1

Definition at line 68 of file spi.h.

◆ SPIFLASH_WE_BIT

#define SPIFLASH_WE_BIT   (1 << SPIFLASH_WE) /* WEL Bit of SPI SR */

Definition at line 69 of file spi.h.

◆ SPIFLASH_WRITE_ENABLE

#define SPIFLASH_WRITE_ENABLE   0x06 /* Write Enable */

Definition at line 75 of file spi.h.

Variable Documentation

◆ flash_devices

const struct flash_device flash_devices[]
extern