13 #define PAGE_SIZE 0x4000l // real page size 15 #define EEPROM_PAGE 0x08004000l // Page1 17 #define EEPROM_SIZE 2048 // 2 k for wear leveling 22 static uint8_t
read(uint16_t addr);
23 static void write(uint16_t addr, uint8_t val);
29 static uint8_t
_read(uint16_t addr);
30 static void _write(uint16_t addr, uint8_t val);
32 static inline uint32_t
read_16(uint32_t addr){
33 return *(__IO uint16_t*)addr;
36 static inline uint8_t
read_8(uint32_t addr){
37 return *(__IO uint8_t*)addr;
40 static inline uint32_t
read_32(uint32_t addr){
41 return *(__IO uint32_t*)addr;
44 static inline FLASH_Status
write_16(uint32_t addr, uint16_t data){
49 static inline FLASH_Status
write_8(uint32_t addr, uint8_t data){
static uint8_t _read(uint16_t addr)
static uint32_t read_32(uint32_t addr)
static void _write(uint16_t addr, uint8_t val)
static void write(uint16_t addr, uint8_t val)
static FLASH_Status erasePageByAddress(uint32_t Page_Address)
static FLASH_Status write_16(uint32_t addr, uint16_t data)
static void FLASH_Lock_check()
static FLASH_Status write_8(uint32_t addr, uint8_t data)
static uint8_t read_8(uint32_t addr)
static FLASH_Status write_8(uint32_t addr, uint8_t data)
static uint8_t read(uint16_t addr)
static void FLASH_Unlock_dis()
static FLASH_Status write_16(uint32_t addr, uint16_t data)
static FLASH_Status _ErasePageByAddress(uint32_t Page_Address)
Erases a specified FLASH page by address.
static uint32_t read_16(uint32_t addr)
static void FLASH_Lock_check()
static void FLASH_Unlock_dis()