eeprom.c File Reference

#include "t89c51cc02.h"
#include "datatypes.h"
#include "eeprom.h"

Go to the source code of this file.

Functions

BYTE EEPROM_read (BYTE address)
 read a byte from the EEPROM
void EEPROM_write (BYTE d, BYTE address)
 write a byte into the EEPROM latches
void EEPROM_flush ()
 writes latched EEPROM contents to the EEPROM

Variables

unsigned char xdata * eepromptr


Detailed Description

Definition in file eeprom.c.


Function Documentation

void EEPROM_flush void   ) 
 

writes latched EEPROM contents to the EEPROM

Prepare the new contents with EEPROM_write before writing them to the EEPROM.
Interrupts are disabled (and restored afterwards) during the actual EEPROM write.

Definition at line 77 of file eeprom.c.

References EEPROM_wait.

BYTE EEPROM_read BYTE  address  ) 
 

read a byte from the EEPROM

A byte is read from the EEPROM at the given EEPROM address.
This routine is limited for reading the first 256 Bytes of the EEPROM memory.

Parameters:
address address offset into EEPROM to read from
Returns:
value of EEPROM at the given address

Definition at line 23 of file eeprom.c.

References EEPROM_wait, and eepromptr.

Referenced by Command_ReadDefaultConfiguration().

void EEPROM_write BYTE  d,
BYTE  address
 

write a byte into the EEPROM latches

This function only latches data but the data is not written to the EEPROM.
Execute EEPROM_flush to actually write the new contents into the EEPROM.

Parameters:
d data byte to write
address address of EEPROM cell

Definition at line 54 of file eeprom.c.

References EEPROM_wait, and eepromptr.


Variable Documentation

unsigned char xdata* eepromptr
 

address pointer into EEPROM

Definition at line 12 of file eeprom.c.

Referenced by EEPROM_read(), and EEPROM_write().


Generated on Wed Oct 24 12:57:24 2007 for SensorControl by  doxygen 1.4.6