2024-01-24 22:08:32 +08:00
|
|
|
#ifndef __FLASH_H__
|
|
|
|
#define __FLASH_H__
|
2024-01-20 13:19:09 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "stm32f10x.h"
|
|
|
|
|
|
|
|
#define FLASH_SAVE_ADDR ((uint32_t)0x800FC00)
|
|
|
|
|
2024-01-24 22:08:32 +08:00
|
|
|
u16 Flash_ReadHalfWord(u32 faddr);
|
|
|
|
u32 Flash_ReadWord(u32 faddr);
|
|
|
|
void Flash_EnableWrite(void);
|
|
|
|
void Flash_DisableWrite(void);
|
|
|
|
u32 Flash_WriteHalfWord(u32 faddr, u16 data);
|
|
|
|
u32 Flash_WriteWord(u32 faddr, u32 data);
|
2024-01-20 13:19:09 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // #ifndef FLASH_H
|
|
|
|
|
|
|
|
|