at24c.h File Reference

Go to the source code of this file.

Data Structures

struct  at24c

Defines

#define I2C_SLA_AT24C   0x50

Functions

int At24cWrite (struct at24c *at24cs, uint8_t *buffer, uint32_t len, uint32_t addr)
 Write data into eeprom memory.
int At24cRead (struct at24c *at24cs, uint8_t *buffer, uint32_t len, uint32_t addr)
 Read data from EEPROM with ACK-Polling support.


Define Documentation

#define I2C_SLA_AT24C   0x50

Definition at line 7 of file at24c.h.

Referenced by EEInit().


Function Documentation

int At24cWrite ( struct at24c at24cs,
uint8_t buffer,
uint32_t  len,
uint32_t  addr 
)

Write data into eeprom memory.

Parameters:
at24cs Device descriptor.
buffer Buffer to transfer to EEPROM.
len Number of bytes to write.
addr Address in EEPROM to place data.
Returns:
0 on success or -1 in case of an error.

Definition at line 165 of file at24c.c.

References at24c::PageSize.

Referenced by EEWriteData().

int At24cRead ( struct at24c at24cs,
uint8_t buffer,
uint32_t  len,
uint32_t  addr 
)

Read data from EEPROM with ACK-Polling support.

Parameters:
at24cs Device descriptor.
buffer Buffer to transfer to from EEPROM.
len Number of bytes to read.
addr Address in EEPROM where to read from.
Returns:
0 on success or -1 in case of an error.

Definition at line 147 of file at24c.c.

Referenced by EEReadData().


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/