Nut/OS  5.0.5
API Reference
at24c.c File Reference
#include <cfg/os.h>
#include <cfg/eeprom.h>
#include <sys/timer.h>
#include <sys/event.h>
#include <stdlib.h>
#include <dev/twif.h>
#include <dev/at24c.h>
Include dependency graph for at24c.c:

Functions

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

Function Documentation

int At24cRead ( struct at24c at24cs,
uint8_t buffer,
uint16_t  len,
uint16_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.

References at24c::ee_mutex, NutEventPost(), NutEventWait(), at24c::PageSize, printf, rc, at24c::SlaveAddress, and at24c::Timeout.

Referenced by EEInit(), and EEReadData().

Here is the call graph for this function:

int At24cWrite ( struct at24c at24cs,
uint8_t buffer,
uint16_t  len,
uint16_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.

References at24c::ee_mutex, NutEventPost(), NutEventWait(), at24c::PageSize, printf, rc, at24c::SlaveAddress, and at24c::Timeout.

Referenced by EEWriteData().

Here is the call graph for this function: