|
I2C EEPROM 1.0
Library for 24CXX I2C EEPROMs
|
A Library for Interfacing AVR with 24CXX EEPROMs. More...
Data Structures | |
| struct | eeprom |
| This creates a new EEPROM instance. More... | |
Typedefs | |
| typedef struct eeprom | eeprom |
| This creates a new EEPROM instance. More... | |
Functions | |
| void | eeprom_init (eeprom *a, uint8_t dev_address, uint16_t size) |
| To set the EEPROM properties. More... | |
| void | eeprom_write (eeprom *a, uint32_t mem_address, uint8_t *data, uint16_t datasize) |
| To write a byte array of data. More... | |
| void | eeprom_read (eeprom *a, uint16_t mem_address, uint8_t *data, uint16_t datasize) |
| To read a byte array. More... | |
| void | eeprom_byte_write (eeprom *a, uint16_t mem_address, uint8_t data) |
| To write a byte. More... | |
| void | eeprom_byte_read (eeprom *a, uint16_t mem_address, uint8_t *data) |
| To read a byte. More... | |
A Library for Interfacing AVR with 24CXX EEPROMs.
Basic functions for use with 24CXX EEPROMs.
Requires: I2C Master library by Peter Fleury pfleury@gmx.ch
This creates a new EEPROM instance.
| void eeprom_byte_read | ( | eeprom * | a, |
| uint16_t | mem_address, | ||
| uint8_t * | data | ||
| ) |
To read a byte.
| *a | Address of the EEPROM instance |
| mem_address | Location of the byte in EEPROM |
| *data | Address of the data byte |
| void eeprom_byte_write | ( | eeprom * | a, |
| uint16_t | mem_address, | ||
| uint8_t | data | ||
| ) |
To write a byte.
| *a | Address of the EEPROM instance |
| mem_address | Address for the byte to be stored |
| data | Byte data |
| void eeprom_init | ( | eeprom * | a, |
| uint8_t | dev_address, | ||
| uint16_t | size | ||
| ) |
To set the EEPROM properties.
| *a | Address of the EEPROM instance |
| dev_address | I2C address of the EEPROM |
| size | Size of the EEPROM in Kbits |
| void eeprom_read | ( | eeprom * | a, |
| uint16_t | mem_address, | ||
| uint8_t * | data, | ||
| uint16_t | datasize | ||
| ) |
To read a byte array.
| *a | Address of the EEPROM instance |
| mem_address | Starting address |
| *data | Data Array |
| datasize | Size of the data array |
| void eeprom_write | ( | eeprom * | a, |
| uint32_t | mem_address, | ||
| uint8_t * | data, | ||
| uint16_t | datasize | ||
| ) |
To write a byte array of data.
| *a | Address of the EEPROM instance |
| mem_address | Starting address |
| *data | Data Array |
| datasize | Size of the data array |