You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

flash.h 1.3KB

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _FLASH_H_
  2. #define _FLASH_H_
  3. #include "stm32f10x.h"
  4. /** ע:ÿдǰȲҪ洢λڵҳǺEEPROMIJ֮ͬFlash߱޸Ĺܣ
  5. ֻȲдʱֻ֧ҳ */
  6. //flash洢ʱ16λʽ洢,
  7. #define PC_NUM_ADDR 0x08030000 //ݴ洢ʼַ 0X08030000-0X08030023
  8. #define STORE_DATA_NUM 10 //еݸ
  9. extern u16 StoreBuffer[STORE_DATA_NUM];//Ҫдflashе
  10. extern u8 Save_Buffer[STORE_DATA_NUM*2];//Ҫͨڶ
  11. typedef unsigned char BOOL;
  12. typedef unsigned char BYTE;
  13. typedef unsigned short WORD;
  14. typedef unsigned long DWORD;
  15. //void Startwritedata(DWORD addr); //ڿԵַaddrʼġҳд
  16. //void Write_Complete(void); //ijҳд
  17. //void SavePara(DWORD addr,WORD data); //ַָaddrдݣֽڣ
  18. //WORD GetPara(DWORD addr); //ȡַָaddrݣֽڣ
  19. //void Savestr_to_flash(DWORD addr,WORD *str,WORD len);//һݴ浽ԣaddrΪʼַ
  20. //void Readstr_of_flash(DWORD addr,WORD *str,WORD len);//ӣaddrΪʼַȡһַ
  21. void SavePara_to_flash(void); //豸ڵ
  22. void Readpara_from_flash(void); //ȡϴζϵʱ豸еһЩ
  23. #endif