www.pudn.com > Test_rtl8019_SRAM.zip > mmc.h, change:2008-07-22,size:1066b


/*####################################################################################### 
Connect ARM to MMC/SD  
 
Copyright (C) 2004 Ulrich Radig 
 
ARM modifications by Ingo Busker 2005 
#######################################################################################*/ 
 
#ifndef _MMC_H_ 
 #define _MMC_H_ 
 
#include "typedefs.h" 
unsigned char Buffer[512];   
unsigned char mmc_scratch[32]; ///< 32 byte Scratch buffer for CSD/CID/ ops 
 
 
//Prototypes 
U08 mmc_read_byte(void); 
extern void mmc_read_block(U08 *,U08 *,U16); 
extern U08 mmc_init(void); 
extern U08 mmc_read_sector (U32,U08 *); 
extern U08 mmc_write_sector (U32,U08 *); 
extern U08 mmc_write_command (U08 *); 
extern U08 mmc_read_csd (U08 *); 
extern U08 mmc_read_cid (U08 *); 
uint32 MMC_SD_ReadCapacity(); 
 
//set MMC_Chip_Select to high (MMC/SD-Karte Inaktiv) 
#define MMC_Disable() SPI_PORT|= (1<<MMC_CS); 
 
//set MMC_Chip_Select to low (MMC/SD-Karte Aktiv) 
#define MMC_Enable() SPI_PORT&=~(1<<MMC_CS); 
 
#define nop()  __asm__ __volatile__ ("nop" ::) 
 
#endif //_MMC_H_