aboutsummaryrefslogtreecommitdiff
path: root/spiflash_n25q128.h
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-02-15 11:22:03 -0500
committerPaul Selkirk <paul@psgd.org>2017-02-15 11:22:03 -0500
commitf6674bdbc765466ba709230a1db669401b8263cc (patch)
tree17d0da3a30bcc66bd20df78e0b9b5fa9231dc8f9 /spiflash_n25q128.h
parent0345b661c6de52013788972b817320ad30b279ba (diff)
Add n25q128_erase_bulk
Diffstat (limited to 'spiflash_n25q128.h')
-rw-r--r--spiflash_n25q128.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/spiflash_n25q128.h b/spiflash_n25q128.h
index c696911..41b6101 100644
--- a/spiflash_n25q128.h
+++ b/spiflash_n25q128.h
@@ -46,6 +46,7 @@
#define N25Q128_COMMAND_WRITE_ENABLE 0x06
#define N25Q128_COMMAND_ERASE_SECTOR 0xD8
#define N25Q128_COMMAND_ERASE_SUBSECTOR 0x20
+#define N25Q128_COMMAND_ERASE_BULK 0xC7
#define N25Q128_COMMAND_PAGE_PROGRAM 0x02
#define N25Q128_PAGE_SIZE 0x100 // 256
@@ -75,6 +76,7 @@ extern int n25q128_read_page(struct spiflash_ctx *ctx, uint32_t page_offset, uin
extern int n25q128_write_page(struct spiflash_ctx *ctx, uint32_t page_offset, const uint8_t *page_buffer);
extern int n25q128_erase_sector(struct spiflash_ctx *ctx, uint32_t sector_offset);
extern int n25q128_erase_subsector(struct spiflash_ctx *ctx, uint32_t subsector_offset);
+extern int n25q128_erase_bulk(struct spiflash_ctx *ctx);
extern int n25q128_write_data(struct spiflash_ctx *ctx, uint32_t offset, const uint8_t *buf, const uint32_t len, const int auto_erase);
extern int n25q128_read_data(struct spiflash_ctx *ctx, uint32_t offset, uint8_t *buf, const uint32_t len);