Driver for the 24xx16 and 24xx256 I2C EEPROMS (implementation) More...
#include "eeprom.h"#include "cfg/cfg_i2c.h"#include "cfg/cfg_eeprom.h"#include <cfg/log.h>#include <cfg/debug.h>#include <cfg/macros.h>#include <cpu/attr.h>#include <drv/i2c.h>#include <string.h>Go to the source code of this file.
Defines | |
| #define | EEPROM_ID 0xA0 |
| EEPROM ID code. | |
| #define | EEPROM_ADDR(x) (EEPROM_ID | (((uint8_t)((x) & 0x07)) << 1)) |
| This macros form the correct slave address for EEPROMs. | |
Functions | |
| bool | eeprom_erase (Eeprom *eep, e2addr_t addr, e2_size_t size) |
| Erase EEPROM. | |
| bool | eeprom_verify (Eeprom *eep, e2addr_t addr, const void *buf, size_t size) |
| Verify EEPROM. | |
| void | eeprom_init_5 (Eeprom *eep, I2c *i2c, EepromType type, e2dev_addr_t addr, bool verify) |
| Initialize EEPROM module. | |
Variables | |
| static const EepromInfo | mem_info [] |
| Array used to describe EEPROM memory devices currently supported. | |
Detailed Description
Driver for the 24xx16 and 24xx256 I2C EEPROMS (implementation)
Definition in file eeprom.c.
Function Documentation
| void eeprom_init_5 | ( | Eeprom * | eep, |
| I2c * | i2c, | ||
| EepromType | type, | ||
| e2dev_addr_t | addr, | ||
| bool | verify | ||
| ) |
Initialize EEPROM module.
- Parameters:
-
eep is the Kblock context. type is the eeprom device we want to initialize (
- See also:
- EepromType)
- Parameters:
-
i2c context for i2c channel addr is the i2c devide address (usually pins A0, A1, A2). verify enable the write check.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/bertos_logo.png)