mirror of
https://github.com/marqs85/ossc.git
synced 2025-01-04 03:30:05 +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);
|
||||
SPI_W(initdata, sizeof(initdata));
|
||||
|
||||
SPI_Timer_On(500);
|
||||
/*SPI_Timer_On(500);
|
||||
while(SPI_Timer_Status()==TRUE);
|
||||
SPI_Timer_Off();
|
||||
SPI_Timer_Off();*/
|
||||
|
||||
dev->mount = FALSE;
|
||||
SPI_Timer_On(500);
|
||||
/*SPI_Timer_On(500);
|
||||
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
|
||||
|
||||
// SD version 2?
|
||||
|
Loading…
Reference in New Issue
Block a user