EFM32 Jade Gecko 1 Software Documentation
efm32jg1-doc-5.1.2
|
Macros | |
#define | EEPROM_DVK_ADDR 0xA0 |
Functions | |
int | EEPROM_Read (I2C_TypeDef *i2c, uint8_t addr, unsigned int offset, uint8_t *data, unsigned int len) |
Read data from EEPROM. More... | |
int | EEPROM_Write (I2C_TypeDef *i2c, uint8_t addr, unsigned int offset, uint8_t *data, unsigned int len) |
Write data to EEPROM. More... | |
#define EEPROM_DVK_ADDR 0xA0 |
int EEPROM_Read | ( | I2C_TypeDef * | i2c, |
uint8_t | addr, | ||
unsigned int | offset, | ||
uint8_t * | data, | ||
unsigned int | len | ||
) |
Read data from EEPROM.
[in] | i2c | Pointer to I2C peripheral register block. |
[in] | addr | I2C address for EEPROM, in 8 bit format, where LSB is reserved for R/W bit. |
[in] | offset | Offset in EEPROM to start reading from. |
[out] | data | Location to place read data, must be at least len long. |
[in] | len | Number of bytes to read. |
Definition at line 126 of file eeprom.c.
References I2C_TransferSeq_TypeDef::addr, I2C_TransferSeq_TypeDef::buf, I2C_TransferSeq_TypeDef::data, EEPROM_DVK_LEN, I2C_TransferSeq_TypeDef::flags, I2C_FLAG_WRITE_READ, I2CSPM_Transfer(), i2cTransferDone, and I2C_TransferSeq_TypeDef::len.
int EEPROM_Write | ( | I2C_TypeDef * | i2c, |
uint8_t | addr, | ||
unsigned int | offset, | ||
uint8_t * | data, | ||
unsigned int | len | ||
) |
Write data to EEPROM.
[in] | i2c | Pointer to I2C peripheral register block. |
[in] | addr | I2C address for EEPROM, in 8 bit format, where LSB is reserved for R/W bit. |
[in] | offset | Offset in EEPROM to start writing to. |
[out] | data | Location holding data to write, must be at least len long. |
[in] | len | Number of bytes to write. |
Definition at line 191 of file eeprom.c.
References I2C_TransferSeq_TypeDef::addr, I2C_TransferSeq_TypeDef::buf, I2C_TransferSeq_TypeDef::data, EEPROM_AckPoll(), EEPROM_DVK_LEN, EEPROM_DVK_PAGESIZE, I2C_TransferSeq_TypeDef::flags, I2C_FLAG_WRITE_WRITE, I2CSPM_Transfer(), i2cTransferDone, and I2C_TransferSeq_TypeDef::len.