//raise SS and MOSI for 80 clock cycles
//SendByte(0xff) 10 times with SS high
//RAISE SS
int i;
// Port 3 Function Dir On/Off
// 3.0-mmcCD Out 0 - card inserted
// 3.1-Dout Out 0 - off 1 - On -> init in SPI_Init
// 3.2-Din Inp 0 - off 1 - On -> init in SPI_Init
// 3.3-Clk Out - -> init in SPI_Init
// 2.6-mmcCS Out 0 - Active 1 - none Active
//Send Command 0 to put MMC in SPI mode
mmcSendCmd(MMC_GO_IDLE_STATE,0,0x95);
//Now wait for READY RESPONSE
if(mmcGetResponse()!=0x00)//
return MMC_INIT_ERROR;
// mmc Get Responce
char mmcGetResponse(void)
{
//Response comes 1-8bytes after command
//the first bit will be a 0
//followed by an error code
//data will be 0xff until response
int i=0;