Files
Matthias 6cc948eef8 Moved remotely
git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@113 9fe90eed-be63-e94b-8204-d34ff4c2ff93
2009-01-12 08:38:14 +00:00

123 lines
4.5 KiB
C

/* ---------------------------------------------------------------------------
* mmc_transfer.h (c) 2008 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: Digital inputs/outputs interface.
* ---------------------------------------------------------------------------
* Version(s): 0.1, May 08, 2008, MMi
* Creation.
* ---------------------------------------------------------------------------
*/
#ifndef MMC_TRANSFER_H_
#define MMC_TRANSFER_H_
/* ---------------------------------------------------------------------------
* System include files.
* ---------------------------------------------------------------------------
*/
#include "LPC23xx.h"
#include "types.h"
#include "mmc.h"
/* ---------------------------------------------------------------------------
* Application include files.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Constant and macro definitions.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Type definitions.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Variable declarations.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Function declarations.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Function: CardRead
*
* Reads user defined blocks and lengths from memory card
*
* Parameters: pUINT8 pData - Data to read to
* UINT32 Add - Address to read from
* UINT32 Length - Length of Data to be read
*
* Return: MmcState_t - Response from Card
* ---------------------------------------------------------------------------
*/
MmcState_t CardRead (pUINT8 pData, UINT32 Address, UINT32 Length);
/* ---------------------------------------------------------------------------
* Function: CardWrite
*
* Writes user defined blocks and lengths to memory card
*
* Parameters: pUINT8 pData - Data to write
* UINT32 Add - Address to write to
* UINT32 Length - Length of Data to be written
*
* Return: MmcState_t - Response from Card
* ---------------------------------------------------------------------------
*/
MmcState_t CardWrite (pUINT8 pData, UINT32 Address, UINT32 Length);
/* ---------------------------------------------------------------------------
* Function: checkLength
*
* Functions checks asked read/write length for valid length-value, which is
* a multible from cards blocksize.
*
* Parameters: UINT32 Length - Length of Block to read or write
*
* Return: BOOLEAN - TRUE if length fits, FALSE if not
* ---------------------------------------------------------------------------
*/
inline BOOLEAN checkLength (UINT32 Length);
/* ---------------------------------------------------------------------------
* Function: MmcReadBlock
*
* Reads from a MMC
*
* Parameters: pUINT8 pData - Pointer to where Content is read
* UINT32 Add - Address to read from
*
* Return: MmcState_t - Response from Card
* ---------------------------------------------------------------------------
*/
inline MmcState_t MmcReadBlock(pUINT8 pData, UINT32 Add);
/* ---------------------------------------------------------------------------
* Function: MmcWriteBlock
*
* Writes to a MMC
*
* Parameters: const UINT8 * pData - Data to write
* UINT32 Add - Address to write to
*
* Return: MmcState_t - Response from Card
* ---------------------------------------------------------------------------
*/
inline MmcState_t MmcWriteBlock(const UINT8 * pData, UINT32 Add);
#endif /*MMC_TRANSFER_H_*/