44 #define M25P16_I_WREN 0x06
45 #define M25P16_I_WRDI 0x04
46 #define M25P16_I_RDID 0x9F
47 #define M25P16_I_RDSR 0x05
48 #define M25P16_I_WRSR 0x01
49 #define M25P16_I_READ 0x03
50 #define M25P16_I_FAST_READ 0x0B
51 #define M25P16_I_PP 0x02
52 #define M25P16_I_SE 0xD8
53 #define M25P16_I_BE 0xC7
54 #define M25P16_I_DP 0xB9
55 #define M25P16_I_RES 0xAB
58 #define M25P16_DUMMY_BYTE 0x00
61 #define M25P16_PIN_CLOCK P1_5
62 #define M25P16_PIN_SER_I P1_6
63 #define M25P16_PIN_SER_O P1_7
66 #define M25P16_SR_SRWD 0x80
67 #define M25P16_SR_BP2 0x10
68 #define M25P16_SR_BP1 0x08
69 #define M25P16_SR_BP0 0x04
70 #define M25P16_SR_BP 0x1C
71 #define M25P16_SR_WEL 0x02
72 #define M25P16_SR_WIP 0x01
75 #ifdef M25P16_CONF_READ_FAST
76 #define M25P16_READ_FAST M25P16_CONF_READ_FAST
78 #define M25P16_READ_FAST 1
107 #define M25P16_BP() (m25p16_rdsr() & M25P16_SR_BP)
116 #define M25P16_WIP() (m25p16_rdsr() & M25P16_SR_WIP)
125 #define M25P16_WEL() (m25p16_rdsr() & M25P16_SR_WEL)
177 void m25p16_read(uint8_t * addr, uint8_t * buff, uint8_t buff_len);
204 void m25p16_pp(uint8_t * addr, uint8_t * buff, uint8_t buff_len);
uint8_t uid_len
Memory Size.
uint8_t m25p16_rdsr()
Read Status Register (RDSR) instruction.
void m25p16_pp(uint8_t *addr, uint8_t *buff, uint8_t buff_len)
Program Page (PP) instruction.
uint8_t m25p16_res_res()
Release Deep Power Down.
void m25p16_read(uint8_t *addr, uint8_t *buff, uint8_t buff_len)
Read Data Bytes (READ) instruction.
void m25p16_wren()
Write Enable (WREN) instruction.
void m25p16_rdid(struct m25p16_rdid *rdid)
Read Identifier (RDID)instruction.
uint8_t uid[16]
Unique ID length.
void m25p16_wrsr(uint8_t val)
Write Status Register (WRSR) instruction.
uint8_t mem_type
Manufacturer ID.
void m25p16_dp()
Deep Power Down (DP) instruction.
void m25p16_se(uint8_t s)
Sector Erase (SE) instruction.
void m25p16_be()
Bulk Erase (SE) instruction.
void m25p16_wrdi()
Write Disable (WRDI) instruction.
uint8_t mem_size
Memory Type.
void m25p16_res()
Release from Deep Power Down (RES) instruction.