17 #define EEPROM_READ_ADDR 0xA1 18 #define EEPROM_WRITE_ADDR 0xA0 319 for(i=0; i<u32Size-1; i++)
void EEPROM_Init(void)
Open I2C interface to access EEPROM.
#define I2C_WAIT_READY(i2c)
This macro will return when I2C module is ready.
#define I2C_GET_STATUS(i2c)
This macro returns the status of I2C module.
uint8_t EEPROM_Read(uint32_t u32Addr)
Read data from EEPROM.
#define I2C
Pointer to I2C register structure.
Mini51 series peripheral access layer header file. This file contains all the peripheral register's d...
uint8_t EEPROM_SequentialRead(uint32_t u32Addr, uint8_t *pu8Buf, uint32_t u32Size)
Read data from EEPROM using sequential read method.
#define EEPROM_WRITE_ADDR
void EEPROM_Write(uint32_t u32Addr, uint8_t u8Data)
Write data to EEPROM.
void EEPROM_PageWrite(uint32_t u32Addr, uint8_t *pu8Buf)
Write page data to EEPROM.
#define I2C_SET_CONTROL_REG(i2c, u8Ctrl)
This macro sets the I2C control register at one time.
MINI51 series 24LC64 EEPROM library header file.
#define I2C_GET_DATA(i2c)
This macro returns the data stored in data register of I2C module.
uint32_t I2C_Open(I2C_T *i2c, uint32_t u32BusClock)
This function make I2C module be ready and set the wanted bus clock.
void CLK_SysTickDelay(uint32_t us)
This function execute delay function.
#define I2C_START(i2c)
This macro only set START bit to the control register of I2C module.
#define I2C_SET_DATA(i2c, u8Data)
This macro writes the data to data register of I2C module.