summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/flash.h
blob: 6f792cb3fec6466adbafa2b48ce1379542240515 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <stdint.h>

#define EOS_FLASH_RDSR      0x05

#define EOS_FLASH_NORD      0x03
#define EOS_FLASH_FRD       0x0b

#define EOS_FLASH_WREN      0x06
#define EOS_FLASH_SER       0x20
#define EOS_FLASH_PP        0x02

#define EOS_FLASH_QPIEN     0x35
#define EOS_FLASH_QPIDI     0xF5

#define EOS_FLASH_WIP       0x01
#define EOS_FLASH_WEL       0x02

void eos_flash_init(void);
void eos_flash_norm(void);
void eos_flash_fast(void);

void eos_flash_wip(void);
void eos_flash_wren(void);
void eos_flash_ser(uint32_t addr);
void eos_flash_pp(uint32_t addr, uint8_t *buf);