Aguijón Software Libraries  1.0
Documentation for the included Libraries
 All Files Functions Variables Typedefs Enumerations Enumerator Macros
EEPROM.c File Reference
#include <p24FJ128GB106.h>
#include "i2c.h"
#include "init.h"
#include "definitions.h"
#include "EEPROM.h"

Go to the source code of this file.

Functions

unsigned char read_EEPROM (unsigned char address)
 
int write_EEPROM (unsigned char address, unsigned char to_write)
 
int test_EEPROM (void)
 

Function Documentation

unsigned char read_EEPROM ( unsigned char  address)

Function: read_EEPROM

Preconditions: None.

Overview: Retrieves a value from the given address stored in the EEPROM.

Arguments: Address to read.

Returns: Stored value if address is valid.

Definition at line 41 of file EEPROM.c.

int test_EEPROM ( void  )

Function: test_EEPROM

Preconditions: None.

Overview: Tests the EEPROM by writing values in different addresses and returning them to 0xFF.

Arguments: None.

Returns: Number of errors (if any) while testing it.

Definition at line 127 of file EEPROM.c.

int write_EEPROM ( unsigned char  address,
unsigned char  to_write 
)

Function: write_EEPROM

Preconditions: None.

Overview: Stores a value in the specified EEPROM address.

Arguments: Address to write, Data to be written.

Returns: TRUE if written data matches the argument, FALSE if written data doesn't match the argument.

Definition at line 95 of file EEPROM.c.