Nut/OS  4.10.3
API Reference
at24c.h File Reference
#include <sys/types.h>
#include <stdint.h>
#include <cfg/eeprom.h>
Include dependency graph for at24c.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  at24c

Defines

#define NUT_CONFIG_AT24_ADR   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 NUT_CONFIG_AT24_ADR   0x50

Definition at line 9 of file at24c.h.

Referenced by EEInit(), and ShowHardwareConfiguration().


Function Documentation

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

Write data into eeprom memory.

Parameters:
at24csDevice descriptor.
bufferBuffer to transfer to EEPROM.
lenNumber of bytes to write.
addrAddress in EEPROM to place data.
Returns:
0 on success or -1 in case of an error.

Definition at line 170 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:
at24csDevice descriptor.
bufferBuffer to transfer to from EEPROM.
lenNumber of bytes to read.
addrAddress in EEPROM where to read from.
Returns:
0 on success or -1 in case of an error.

Definition at line 152 of file at24c.c.

Referenced by EEInit(), and EEReadData().