\hypertarget{eeprom_8c}{
\section{eeprom.c File Reference}
\label{eeprom_8c}\index{eeprom.c@{eeprom.c}}
}
{\tt \#include \char`\"{}t89c51cc02.h\char`\"{}}\par
{\tt \#include \char`\"{}datatypes.h\char`\"{}}\par
{\tt \#include \char`\"{}eeprom.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} \hyperlink{eeprom_8c_9e6179f113cda6225711a1336358ce6d}{EEPROM\_\-read} (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} address)
\begin{CompactList}\small\item\em read a byte from the EEPROM \item\end{CompactList}\item 
void \hyperlink{eeprom_8c_b7e6d0c63c7f8baad081784b2d8ae2cb}{EEPROM\_\-write} (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} d, \hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} address)
\begin{CompactList}\small\item\em write a byte into the EEPROM latches \item\end{CompactList}\item 
void \hyperlink{eeprom_8c_22bdd1a3bbb0ddc4da1e3f6ced35e8e2}{EEPROM\_\-flush} ()
\begin{CompactList}\small\item\em writes latched EEPROM contents to the EEPROM \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
unsigned char xdata $\ast$ \hyperlink{eeprom_8c_5968e49e734b5518528a1fb7c0ddbf48}{eepromptr}
\end{CompactItemize}


\subsection{Detailed Description}


Definition in file \hyperlink{eeprom_8c-source}{eeprom.c}.

\subsection{Function Documentation}
\hypertarget{eeprom_8c_22bdd1a3bbb0ddc4da1e3f6ced35e8e2}{
\index{eeprom.c@{eeprom.c}!EEPROM_flush@{EEPROM\_\-flush}}
\index{EEPROM_flush@{EEPROM\_\-flush}!eeprom.c@{eeprom.c}}
\subsubsection[EEPROM\_\-flush]{\setlength{\rightskip}{0pt plus 5cm}void EEPROM\_\-flush (void)}}
\label{eeprom_8c_22bdd1a3bbb0ddc4da1e3f6ced35e8e2}


writes latched EEPROM contents to the EEPROM 

Prepare the new contents with \hyperlink{eeprom_8h_4a6ad7034dbd88f379ff5bc21389dabf}{EEPROM\_\-write} before writing them to the EEPROM.\par
 Interrupts are disabled (and restored afterwards) during the actual EEPROM write. 

Definition at line 77 of file eeprom.c.

References EEPROM\_\-wait.\hypertarget{eeprom_8c_9e6179f113cda6225711a1336358ce6d}{
\index{eeprom.c@{eeprom.c}!EEPROM_read@{EEPROM\_\-read}}
\index{EEPROM_read@{EEPROM\_\-read}!eeprom.c@{eeprom.c}}
\subsubsection[EEPROM\_\-read]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} EEPROM\_\-read (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} {\em address})}}
\label{eeprom_8c_9e6179f113cda6225711a1336358ce6d}


read a byte from the EEPROM 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em address}]address offset into EEPROM to read from \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]value of EEPROM at the given address \end{Desc}


Definition at line 23 of file eeprom.c.

References EEPROM\_\-wait, and eepromptr.

Referenced by Command\_\-Read\-Default\-Configuration().\hypertarget{eeprom_8c_b7e6d0c63c7f8baad081784b2d8ae2cb}{
\index{eeprom.c@{eeprom.c}!EEPROM_write@{EEPROM\_\-write}}
\index{EEPROM_write@{EEPROM\_\-write}!eeprom.c@{eeprom.c}}
\subsubsection[EEPROM\_\-write]{\setlength{\rightskip}{0pt plus 5cm}void EEPROM\_\-write (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} {\em d}, \hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} {\em address})}}
\label{eeprom_8c_b7e6d0c63c7f8baad081784b2d8ae2cb}


write a byte into the EEPROM latches 

This function only latches data but the data is not written to the EEPROM.\par
 Execute \hyperlink{eeprom_8h_4e7413148b211505d8b8e9a897444c90}{EEPROM\_\-flush} to actually write the new contents into the EEPROM.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em d}]data byte to write \item[{\em address}]address of EEPROM cell \end{description}
\end{Desc}


Definition at line 54 of file eeprom.c.

References EEPROM\_\-wait, and eepromptr.

\subsection{Variable Documentation}
\hypertarget{eeprom_8c_5968e49e734b5518528a1fb7c0ddbf48}{
\index{eeprom.c@{eeprom.c}!eepromptr@{eepromptr}}
\index{eepromptr@{eepromptr}!eeprom.c@{eeprom.c}}
\subsubsection[eepromptr]{\setlength{\rightskip}{0pt plus 5cm}unsigned char xdata$\ast$ \hyperlink{eeprom_8c_5968e49e734b5518528a1fb7c0ddbf48}{eepromptr}}}
\label{eeprom_8c_5968e49e734b5518528a1fb7c0ddbf48}


address pointer into EEPROM 

Definition at line 12 of file eeprom.c.

Referenced by EEPROM\_\-read(), and EEPROM\_\-write().