00001 /*! \file param.h \brief EEPROM Parameter Storage Library. */ 00002 //***************************************************************************** 00003 // 00004 // File Name : 'param.h' 00005 // Title : EEPROM Parameter Storage Library 00006 // Author : Pascal Stang (c)2005 00007 // Created : 9/16/2005 00008 // Revised : 9/20/2005 00009 // Version : 0.1 00010 // Target MCU : Atmel AVR series 00011 // Editor Tabs : 4 00012 // 00013 /// \ingroup driver_avr 00014 /// \defgroup param EEPROM Parameter Storage Library (param.c) 00015 /// \code #include "param.h" \endcode 00016 /// \par Description 00017 /// The "Param" library provide two simple functions for loading and 00018 /// storing blocks of parameters out of and into internal EEPROM. 00019 // 00020 // This code is distributed under the GNU Public License 00021 // which can be found at http://www.gnu.org/licenses/gpl.txt 00022 //***************************************************************************** 00023 //@{ 00024 00025 #ifndef PARAM_H 00026 #define PARAM_H 00027 00028 00029 /*! paramStore saves a block of data/parameters into EEPROM from RAM, 00030 and performs an 8-bit checksum, stored in EEPROM immediately after the data block. 00031 \param parameters pointer to SRAM location where parameters are stored 00032 \param memaddr pointer to EEPROM memory address where parameters should be written 00033 \param sizebytes size of parameter block in bytes */ 00034 void paramStore(u08* parameters, u08* memaddr, u16 sizebytes); 00035 00036 /*! paramLoad loads a block of data/parameters into RAM from EEPROM, 00037 and performs an 8-bit checksum to validate it. 00038 \param parameters pointer to SRAM location into which parameters should be loaded 00039 \param memaddr pointer to EEPROM memory address parameters are stored 00040 \param sizebytes size of parameter block in bytes 00041 \return TRUE if load successful and checksum matched, FALSE otherwise */ 00042 u08 paramLoad(u08* parameters, u08* memaddr, u16 sizebytes); 00043 00044 #endif 00045 //@}