|
1234567891011121314151617181920212223242526272829303132333435 |
- #ifndef _STMFLASH_H
- #define _STMFLASH_H
-
- #include "stm32f10x.h"
-
-
-
- //////////////////////////////////////////////////////////////////////////////////////////////////////
- //ûԼҪ
- #define STM32_FLASH_SIZE 256 //ѡSTM32FLASHС(λΪK)
- #define STM32_FLASH_WREN 1 //ʹFLASHд(0;1ʹ)
- //////////////////////////////////////////////////////////////////////////////////////////////////////
-
- //FLASHʼַ
- #define STM32_FLASH_BASE 0x08000000 //STM32 FLASHʼַ
- //FLASHֵ
- //#define PC_NUM_ADDR 0x08030000 //ݴ洢ʼַ 0X08030000-0X08030023
-
- #define STORE_DATA_NUM 10 //еݸ
- extern u16 StoreBuffer[STORE_DATA_NUM];//Ҫдflashе
- extern u8 Save_Buffer[STORE_DATA_NUM*2];//Ҫͨڶ
-
- u16 STMFLASH_ReadHalfWord(u32 faddr); //
- void STMFLASH_WriteLenByte(u32 WriteAddr,u32 DataToWrite,u16 Len); //ַָʼдָȵ
- u32 STMFLASH_ReadLenByte(u32 ReadAddr,u16 Len); //ַָʼȡָ
- void STMFLASH_Write(u32 WriteAddr,u16 *pBuffer,u16 NumToWrite); //ַָʼдָȵ
- void STMFLASH_Read(u32 ReadAddr,u16 *pBuffer,u16 NumToRead); //ַָʼָȵ
-
- //д
- void Test_Write(u32 WriteAddr,u16 WriteData);
-
-
-
-
- #endif
|