aboutsummaryrefslogtreecommitdiffhomepage
path: root/S100App/Inc/Flash.h
blob: be833ed8045f22520fafe261f89d7459fa5d4379 (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
26
27
28
29
/********************* (C) COPYRIGHT 2015 e-Design Co.,Ltd. ********************
 File Name : Flash.h
 Version  :                                     Author : bure
*******************************************************************************/
#ifndef __EXT_FLASH_H
#define __EXT_FLASH_H

#define PAGESIZE   256

#define WREN       0x06   // Write enable instruction
#define READ       0x03   // Read from Memory instruction
#define RDSR       0x05   // Read Status Register instruction
#define PP         0x02   // Write to Memory instruction
#define PW         0x0A   // Page write instruction

#define OK         0      // �������
#define SEC_ERR    1      // ���������
#define TMAX       100000 // ��ʱ����

#define WIP_Flag   0x01   // Write In Progress (WIP) flag
#define Dummy_Byte 0xA5

u8   FLASH_Prog(u32 Address, u16 Data);
void FLASH_Erase(u32 Address);
void ExtFlashPageWR(u8* pBuffer, u32 WriteAddr);
void ExtFlashDataRD(u8* pBuffer, u32 ReadAddr, u16 Lenght);
#endif

/*********************************  END OF FILE  ******************************/