mirror of
https://github.com/marqs85/ossc.git
synced 2025-01-06 00:30:04 +00:00
Speed up SD card detection.
This commit is contained in:
parent
5d3e3bbe33
commit
6dfd2be3ed
@ -292,14 +292,16 @@ SDRESULTS SD_Init(SD_DEV *dev)
|
|||||||
//for(idx = 0; idx != 10; idx++) SPI_RW(0xFF);
|
//for(idx = 0; idx != 10; idx++) SPI_RW(0xFF);
|
||||||
SPI_W(initdata, sizeof(initdata));
|
SPI_W(initdata, sizeof(initdata));
|
||||||
|
|
||||||
SPI_Timer_On(500);
|
/*SPI_Timer_On(500);
|
||||||
while(SPI_Timer_Status()==TRUE);
|
while(SPI_Timer_Status()==TRUE);
|
||||||
SPI_Timer_Off();
|
SPI_Timer_Off();*/
|
||||||
|
|
||||||
dev->mount = FALSE;
|
dev->mount = FALSE;
|
||||||
SPI_Timer_On(500);
|
/*SPI_Timer_On(500);
|
||||||
while ((__SD_Send_Cmd(CMD0, 0) != 1)&&(SPI_Timer_Status()==TRUE));
|
while ((__SD_Send_Cmd(CMD0, 0) != 1)&&(SPI_Timer_Status()==TRUE));
|
||||||
SPI_Timer_Off();
|
SPI_Timer_Off();*/
|
||||||
|
if (__SD_Send_Cmd(CMD0, 0) != 1)
|
||||||
|
continue;
|
||||||
// Idle state
|
// Idle state
|
||||||
|
|
||||||
// SD version 2?
|
// SD version 2?
|
||||||
|
Loading…
Reference in New Issue
Block a user