25#define FLASH_SPI_BITRATE 1000000
26#define FLASH_SPI_FRAME_SIZE 8
29#define FLASH_WRITE_ENABLE 0x06
30#define FLASH_WRITE_DISABLE 0x04
31#define FLASH_READ_ID 0x9F
32#define FLASH_READ_STATUS_REG 0x05
33#define FLASH_WRITE_STATUS_REG 0x01
34#define FLASH_READ_LOCK_REG 0xE8
35#define FLASH_WRITE_LOCK_REG 0xE5
36#define FLASH_READ_DATA 0x03
37#define FLASH_FAST_READ_DATA 0x0B
38#define FLASH_PROGRAM_PAGE 0x02
39#define FLASH_SECTOR_ERASE 0xD8
40#define FLASH_BULK_ERASE 0xC7
void flash_write_enable(void)
Definition flash_spi.c:31
uint8_t flash_read_status_reg(void)
Definition flash_spi.c:63
void flash_sector_erase(uint32_t address)
Definition flash_spi.c:175
void flash_write_lock_reg(uint32_t address, uint8_t data)
Definition flash_spi.c:101
uint8_t flash_read_lock_reg(uint32_t address)
Definition flash_spi.c:84
void flash_write_disable(void)
Definition flash_spi.c:39
void flash_bulk_erase(void)
Definition flash_spi.c:189
void flash_program_page(uint32_t address, uint8_t *data, uint16_t size)
Definition flash_spi.c:155
void flash_read_id(uint8_t *id_buffer, uint8_t buff_size)
Definition flash_spi.c:47
void flash_fast_read_data(uint32_t start_addr, uint8_t *dst, uint32_t size)
Definition flash_spi.c:134
uint8_t is_flash_busy(void)
Definition flash_spi.c:198
uint8_t flash_read_data(uint32_t address)
Definition flash_spi.c:117
void flash_write_status_reg(uint8_t data)
Definition flash_spi.c:75