35 #ifndef __STC8x_EEPROM_H_
36 #define __STC8x_EEPROM_H_
47 #if (PER_LIB_MCU_MUODEL == STC8Ax)
49 #elif (PER_LIB_MCU_MUODEL == STC8Cx)
51 #elif (PER_LIB_MCU_MUODEL == STC8Fx)
53 #elif (PER_LIB_MCU_MUODEL == STC8Gx)
55 #elif (PER_LIB_MCU_MUODEL == STC8Hx)
64 #ifndef PER_LIB_MCU_MUODEL
67 #define PER_LIB_MCU_MUODEL STC8Ax
71 #ifndef PER_LIB_EEPROM_CTRL
74 #define PER_LIB_EEPROM_CTRL 1
78 #ifndef PER_LIB_EEPROM_INIT_CTRL
81 #define PER_LIB_EEPROM_INIT_CTRL 1
85 #ifndef PER_LIB_EEPROM_WORK_CTRL
88 #define PER_LIB_EEPROM_WORK_CTRL 1
94 #if (PER_LIB_EEPROM_CTRL == 1)
96 #if (PER_LIB_EEPROM_INIT_CTRL == 1)
110 #if (PER_LIB_EEPROM_WORK_CTRL == 1)
116 #define EEPROM_GET_STATE() (IAP_CONTR & 0x01)
124 #define EEPROM_CTRL(run) {IAP_CONTR = (IAP_CONTR & 0x7F) | (run << 7);}
BOOL
Definition: ELL_CORE.h:50
FSCSTATE
Definition: ELL_CORE.h:65
unsigned int uint16_t
Definition: ELL_TYPE.h:73
unsigned char uint8_t
Definition: ELL_TYPE.h:72
uint8_t EEPROM_Read_Byte(uint16_t addr)
EEPROM读取一个字节函数。
FSCSTATE EEPROM_Read_Arry(uint16_t addr, uint8_t *arry, uint8_t len)
EEPROM读取一个数组函数。
FSCSTATE EEPROM_Write_Byte(uint16_t addr, uint8_t byte)
EEPROM写一个字节函数。
FSCSTATE EEPROM_Write_Str(uint16_t addr, const uint8_t *str)
EEPROM写一个字符串。
FSCSTATE EEPROM_Erase_Page(uint16_t addr)
EEPROM 擦除扇区函数。
FSCSTATE EEPROM_Init(BOOL run)
EEPROM初始化函数。
FSCSTATE EEPROM_Write_Arry(uint16_t addr, const uint8_t *arry, uint8_t len)
EEPROM写一个数组函数。