Added Software projects

git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@55 9fe90eed-be63-e94b-8204-d34ff4c2ff93
This commit is contained in:
Matthias
2008-12-23 10:34:08 +00:00
parent ee5a771818
commit 373a8c32b2
348 changed files with 86781 additions and 0 deletions
+89
View File
@@ -0,0 +1,89 @@
/* ---------------------------------------------------------------------------
* mem.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: Non-volatile memory interface.
* ---------------------------------------------------------------------------
* Version(s): 0.1, 10-09-2007, Marcel Mulder.
* Creation.
* ---------------------------------------------------------------------------
*/
#ifndef __MEM_H__
#define __MEM_H__
/** \file mem.h
\brief Non-volatile memory interface.
*/
/* ---------------------------------------------------------------------------
* System include files.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Application include files.
* ---------------------------------------------------------------------------
*/
#include "lpc23xx.h"
#include "types.h"
/* ---------------------------------------------------------------------------
* Constant and macro definitions.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Type definitions.
* ---------------------------------------------------------------------------
*/
typedef enum
{
SEEPROM, /**< Serial (SPI) EEPROM*/
SFLASH, /**< Serial (SPI) FLASH*/
IFLASH, /**< Internal FLASH*/
ISRAM /**< Internal battery backupped SRAM*/
} t_mem_devices;
/* ---------------------------------------------------------------------------
* Variable declarations.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Function declarations.
* ---------------------------------------------------------------------------
*/
/** \brief Initialize non-volatile memory interface.*/
void memInit (void);
/** \brief Read from non-volatile memory.
\retval len Length of data
\retval data Pointer to data
\retval bool True if succesfull
*/
BOOLEAN memRead (
t_mem_devices memDevices,
UINT32 addr, /**< Address of memory device*/
UINT16 * len, /**< Pointer to length of data*/
UINT8 * data /**< Pointer to data*/
);
/** \brief Write to non-volatile memory.
\retval bool True if succesfull
*/
BOOLEAN memWrite (
t_mem_devices memDevices,
UINT32 addr, /**< Address of memory device*/
UINT16 len, /**< Length of data*/
UINT8 * data /**< Pointer to data*/
);
#endif /* __MEM_H__ */