at24c32 access library
Functions | Variables
at24c32Read.c File Reference
#include <stdio.h>
#include <stdbool.h>
#include <errno.h>
#include <at24c32.h>
Include dependency graph for at24c32Read.c:

Functions

unsigned char at24c32ByteRead (int fd, unsigned short address)
 reads a byte from the EEPROM More...
 
unsigned char * at24c32BlockRead (int fd, unsigned short address, unsigned short length)
 reads a block of data from the EEPROM More...
 
unsigned char a24c32CurrentAddressRead (int fd)
 reads from current memory address More...
 

Variables

bool at24c32Debug
 
unsigned char at24c32BlockData [AT24C32_SIZE]
 

Detailed Description

Contains functions to read the at24c32 eeprom

Copyright U. Raich Dec. 2016

This program is part of a course on embedded systems held at the University of Cape Coast, Ghana in 2017 It is released under the GNU Public License For details please see https://www.gnu.org/licenses/gpl.html

Function Documentation

unsigned char a24c32CurrentAddressRead ( int  fd)

reads from current memory address

Parameters
intfd: the file descriptor returned by a24c32Open
Returns
a byte read from the current address
unsigned char* at24c32BlockRead ( int  fd,
unsigned short  address,
unsigned short  length 
)

reads a block of data from the EEPROM

Parameters
intfd: the file descriptor returned by a24c32Open
unsignedshort address: the memory address to read from
unsignedshort length: the number of bytes to be read
Returns
the data are put into a unsigned char array
unsigned char at24c32ByteRead ( int  fd,
unsigned short  address 
)

reads a byte from the EEPROM

Parameters
intfd: the file descriptor returned by a24c32Open
unsignedshort address: the memory address to read from
Returns
the data byte read