EZR32 Wonder Gecko Software Documentation
ezr32wg-doc-5.1.2
|
EEPROM driver for 24AA024 (2Kbit) EEPROM device on the DK.
Copyright 2015 Silicon Labs, Inc. http://www.silabs.com
This file is licensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.
Definition in file eeprom.c.
Go to the source code of this file.
Macros | |
#define | EEPROM_DVK_LEN 0x100 |
#define | EEPROM_DVK_PAGESIZE 16 |
Functions | |
static int | EEPROM_AckPoll (I2C_TypeDef *i2c, uint8_t addr) |
Do acknowledge polling on EEPROM device. More... | |
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_LEN 0x100 |
Number of bytes in EEPROM
Definition at line 25 of file eeprom.c.
Referenced by EEPROM_Read(), and EEPROM_Write().
#define EEPROM_DVK_PAGESIZE 16 |
|
static |
Do acknowledge polling on EEPROM device.
When writing to an EEPROM, the EEPROM device will be busy for some time after issuing a (page) write. During this time, the EEPROM is not accessible, and will therefore not ACK any requests. This feature can be used to determine when the write is actually completed, and is denoted acknowledgement polling.
[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. |
Definition at line 63 of file eeprom.c.
References I2C_TransferSeq_TypeDef::addr, I2C_TransferSeq_TypeDef::buf, I2C_TransferSeq_TypeDef::data, I2C_TransferSeq_TypeDef::flags, I2C_FLAG_WRITE, I2CSPM_Transfer(), i2cTransferDone, i2cTransferNack, and I2C_TransferSeq_TypeDef::len.
Referenced by EEPROM_Write().