EEPROM driver for 24AA024 (2Kbit) EEPROM device on the DK. More...
#include <stddef.h>
#include "i2cdrv.h"
#include "em_i2c.h"
#include "em_device.h"
Go to the source code of this file.
Defines | |
#define | EEPROM_DVK_LEN 0x100 |
Number of bytes in EEPROM. | |
#define | EEPROM_DVK_PAGESIZE 16 |
Pagesize in EEPROM. | |
Functions | |
static int | EEPROM_AckPoll (I2C_TypeDef *i2c, uint8_t addr) |
Do acknowledge polling on EEPROM device. | |
int | EEPROM_Read (I2C_TypeDef *i2c, uint8_t addr, unsigned int offset, uint8_t *data, unsigned int len) |
Read data from EEPROM. | |
int | EEPROM_Write (I2C_TypeDef *i2c, uint8_t addr, unsigned int offset, uint8_t *data, unsigned int len) |
Write data to EEPROM. |
EEPROM driver for 24AA024 (2Kbit) EEPROM device on the DK.
(C) Copyright 2014 Silicon Labs, http://www.silabs.com
This file is licensensed 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.
#define EEPROM_DVK_LEN 0x100 |
Number of bytes in EEPROM.
Definition at line 28 of file eeprom.c.
Referenced by EEPROM_Read(), and EEPROM_Write().
#define EEPROM_DVK_PAGESIZE 16 |
static int EEPROM_AckPoll | ( | I2C_TypeDef * | i2c, | |
uint8_t | addr | |||
) | [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 66 of file eeprom.c.
References I2CDRV_Transfer().
Referenced by EEPROM_Write().