mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Create readme Started commenting the files in english NO Optimisations yet, just trying to get it all working over as is first Using newer STM StdPeriph libs (i think they are newer?)
30 lines
1.1 KiB
C
30 lines
1.1 KiB
C
/********************* (C) COPYRIGHT 2015 e-Design Co.,Ltd. ********************
|
||
File Name : Flash.h
|
||
Version : Author : bure
|
||
*******************************************************************************/
|
||
#ifndef __EXT_FLASH_H
|
||
#define __EXT_FLASH_H
|
||
#include "stm32f10x.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 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
#define SEC_ERR 1 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>
|
||
#define TMAX 100000 // <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
||
|
||
#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 ******************************/
|