/* --------------------------------------------------------------------------- * eeprom.h - v0.1 (c) 2007 Micro-key bv * --------------------------------------------------------------------------- * Micro-key bv * Industrieweg 28, 9804 TG Noordhorn * Postbus 92, 9800 AB Zuidhorn * The Netherlands * Tel: +31 594 503020 * Fax: +31 594 505825 * Email: support@microkey.nl * Web: www.microkey.nl * --------------------------------------------------------------------------- * Description: EEPROM interface * --------------------------------------------------------------------------- * Version(s): 0.1, 10-09-2007, Marcel Mulder. * Creation. * --------------------------------------------------------------------------- */ #ifndef __EEPROM_H__ #define __EEPROM_H__ /** \file eeprom.h \brief EEPROM interface (tested on m95512) */ /* --------------------------------------------------------------------------- * System include files. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Application include files. * --------------------------------------------------------------------------- */ #include "lpc23xx.h" #include "types.h" /* --------------------------------------------------------------------------- * Constant and macro definitions. * --------------------------------------------------------------------------- */ #define eepromSIZE (2^16) // 64 kBytes = 512 kBit = 2^16 #define MAX_VARSINEEPROM 300 // Let op max. aantal vaiabelen in eeprom // JHi 12-03-2008 /* --------------------------------------------------------------------------- * Type definitions. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Variable declarations. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Function declarations. * --------------------------------------------------------------------------- */ void eepromInit( void ); RESULT eepromWrite( UINT16 address, UINT8 byte ); RESULT eepromRead( UINT16 address, UINT8 *byte ); RESULT eepromWriteBuffer( UINT16 address, UINT8 *buffer, UINT16 bufferSize ); RESULT eepromReadBuffer( UINT16 address, UINT8 *buffer, UINT16 bufferSize ); RESULT eepromWriteVar(int variableId, void *parameter ); RESULT eepromReadVar(int variableId, void *parameter ); #endif /* __EEPROM_H__ */