mtd_spi_nor.h File Reference

Interface definition for the serial flash memory driver. More...

Detailed Description

Interface definition for the serial flash memory driver.

Author
Joakim NohlgÄrd joaki.nosp@m.m.no.nosp@m.hlgar.nosp@m.d@ei.nosp@m.stec..nosp@m.se
Vincent Dupont vince.nosp@m.nt@o.nosp@m.takey.nosp@m.s.co.nosp@m.m

Definition in file mtd_spi_nor.h.

#include <stdint.h>
#include "periph_conf.h"
#include "periph/spi.h"
#include "periph/gpio.h"
#include "mtd.h"
+ Include dependency graph for mtd_spi_nor.h:

Go to the source code of this file.

Data Structures

struct  mtd_spi_nor_opcode_t
 SPI NOR flash opcode table. More...
 
struct  mtd_jedec_id_t
 Internal representation of JEDEC memory ID codes. More...
 
struct  mtd_spi_nor_params_t
 Compile-time parameters for a serial flash device. More...
 
struct  mtd_spi_nor_t
 Device descriptor for serial flash memory devices. More...
 

Macros

#define JEDEC_NEXT_BANK   (0x7f)
 Byte to signal increment bank number when reading manufacturer ID. More...
 
#define JEDEC_BANK_MAX   (10)
 The highest possible bank number when reading manufacturer ID. More...
 
#define SPI_NOR_F_SECT_4K   (1)
 Flag to set when the device support 4KiB sector erase (sector_erase opcode)
 
#define SPI_NOR_F_SECT_32K   (2)
 Flag to set when the device support 32KiB block erase (block_erase_32k opcode)
 
#define SPI_NOR_F_SECT_64K   (4)
 Flag to set when the device support 64KiB block erase (block_erase_32k opcode)
 

Variables

const mtd_desc_t mtd_spi_nor_driver
 NOR flash SPI MTD device operations table.
 
const mtd_spi_nor_opcode_t mtd_spi_nor_opcode_default
 Default command opcodes. More...
 
const mtd_spi_nor_opcode_t mtd_spi_nor_opcode_default_4bytes
 Default 4-byte addresses opcodes. More...