void Test_SDI(void) { ULONG save_rGPEUP, save_rGPECON; RCA=0; MMC=0; block=3072; //3072Blocks=1.5MByte, ((2Block=1024Byte)*1024Block=1MByte) save_rGPEUP=rGPEUP; save_rGPECON=rGPECON; rGPEUP = 0xf83f; // SDCMD, SDDAT[3:0] => PU En. rGPECON = 0xaaaaaaaa; //SDCMD, SDDAT[3:0] Uart_Printf("\nSDI Card Write and Read Test\n"); if(!SD_card_init()) return; TR_Buf_new(); Wt_Block(); Rd_Block(); View_Rx_buf(); if(MMC) TR_Buf_new(); if(MMC) { rSDICON |=(1<<5); // YH 0519, MMC Type SDCLK Wt_Stream(); Rd_Stream(); View_Rx_buf(); } Card_sel_desel(0); // Card deselect if(!CMD9()) Uart_Printf("Get CSD fail!!!\n"); rSDIDCON=0;//tark??? rSDICSTA=0xffff; rGPEUP=save_rGPEUP; rGPECON=save_rGPECON; }
void Test_SDI(void) { U32 save_rGPEUP, save_rGPECON; RCA=0; MMC=0; block=3072; //3072Blocks=1.5MByte, ((2Block=1024Byte)*1024Block=1MByte) save_rGPEUP=GPEUP; save_rGPECON=GPECON; GPEUP = 0xf83f; // SDCMD, SDDAT[3:0] => PU En. GPECON = 0xaaaaaaaa; //SDCMD, SDDAT[3:0] //Uart_Printf("\nSDI Card Write and Read Test\n"); if(!SD_card_init()) return; TR_Buf_new(); Wt_Block(); Rd_Block(); View_Rx_buf(); Card_sel_desel(0); // Card deselect if(!CMD9()) //Uart_Printf("Get CSD fail!!!\n"); SDIDCON=0;//tark??? SDICSTA=0xffff; GPEUP=save_rGPEUP; GPECON=save_rGPECON; }