Rev 366 | Rev 379 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 366 | Rev 378 | ||
---|---|---|---|
Line 173... | Line 173... | ||
173 | SSC_Enable(); // enable chipselect. |
173 | SSC_Enable(); // enable chipselect. |
174 | timestamp = SetDelay(timeout); |
174 | timestamp = SetDelay(timeout); |
175 | do |
175 | do |
176 | { |
176 | { |
177 | rsp = SSC_GetChar(); |
177 | rsp = SSC_GetChar(); |
178 | if(CheckDelay(timestamp)) break; |
178 | if(CheckDelay(timestamp)) break; |
179 | }while(rsp != 0xFF && (SD_WatchDog)); // wait while card is busy (data out low) |
179 | }while(rsp != 0xFF && (SD_WatchDog)); // wait while card is busy (data out low) |
180 | return(rsp); |
180 | return(rsp); |
181 | } |
181 | } |
Line 197... | Line 197... | ||
197 | u16 a; |
197 | u16 a; |
198 | u8 cmd[6]; |
198 | u8 cmd[6]; |
Line 199... | Line 199... | ||
199 | 199 | ||
200 | SSC_ClearRxFifo(); // clear the rx fifo |
200 | SSC_ClearRxFifo(); // clear the rx fifo |
201 | SSC_Enable(); // enable chipselect. |
201 | SSC_Enable(); // enable chipselect. |
202 | SDC_WaitForBusy(500); // wait 500ms until card is busy |
202 | SDC_WaitForBusy(600); // wait 500ms until card is busy |
203 | SSC_ClearRxFifo(); // clear the rx fifo |
203 | SSC_ClearRxFifo(); // clear the rx fifo |
Line 204... | Line 204... | ||
204 | SSC_GetChar(); // dummy to sync |
204 | SSC_GetChar(); // dummy to sync |
205 | 205 |