STM32F10x library
fls_25.h
1 #ifndef MAT_SPIFLASH_H
2 #define MAT_SPIFLASH_H
3 
4 #include <inttypes.h>
5 
6 void fls25_init(const uint8_t n);
7 
8 uint8_t fls25_rd(const uint8_t n, const uint32_t adr, uint8_t* buf, uint16_t len);
9 
10 void fls25_we(const uint8_t n);
11 uint8_t fls25_wr(const uint8_t n, const uint32_t adr, uint8_t* buf, uint16_t len);
12 
13 uint8_t fls25_secterase(const uint8_t n, const uint16_t adr);
14 uint8_t fls25_chiperase(const uint8_t n);
15 
16 uint32_t fls25_id(const uint8_t n);
17 void fls25_clrstat(const uint8_t n);
18 
19 #endif
uint8_t fls25_secterase(const uint8_t n, const uint16_t adr)
Execute erase sector command.
Definition: fls_25.c:154
void fls25_init(const uint8_t n)
Init flash.
Definition: fls_25.c:46
uint8_t fls25_wr(const uint8_t n, const uint32_t adr, uint8_t *buf, uint16_t len)
Write to flash.
Definition: fls_25.c:99
void fls25_we(const uint8_t n)
Flash write enable.
Definition: fls_25.c:82
uint32_t fls25_id(const uint8_t n)
Execute read manufacturer/device ID command.
Definition: fls_25.c:173
uint8_t fls25_chiperase(const uint8_t n)
Execute erase device command.
Definition: fls_25.c:137
uint8_t fls25_rd(const uint8_t n, const uint32_t adr, uint8_t *buf, uint16_t len)
Read from flash.
Definition: fls_25.c:59
void fls25_clrstat(const uint8_t n)
Clear status (unprotects blocks).
Definition: fls_25.c:195