Stefan Schuermans commited on 2012-05-03 19:13:40
Showing 1 changed files, with 5 additions and 2 deletions.
| ... | ... |
@@ -58,6 +58,9 @@ |
| 58 | 58 |
#define CF_SB_IDX (1) |
| 59 | 59 |
#define CF_SB_ERR (0) |
| 60 | 60 |
|
| 61 |
+// time to give CF to power up (in 20ms steps) |
|
| 62 |
+#define CF_POWERUP_TIME (5) // 100ms |
|
| 63 |
+ |
|
| 61 | 64 |
// timeout value for wait for ready after reset counter (in 20ms steps) |
| 62 | 65 |
#define CF_RESET_READY_TIMEOUT (50) // 1s |
| 63 | 66 |
|
| ... | ... |
@@ -386,12 +389,12 @@ char CfIsPresent(void) // (extern) |
| 386 | 389 |
*/ |
| 387 | 390 |
char CfReset(void) // (extern) |
| 388 | 391 |
{
|
| 389 |
- // wait one tick |
|
| 392 |
+ // wait a little bit |
|
| 390 | 393 |
if (!CF_IS_DETECT()) {
|
| 391 | 394 |
CfGone(); |
| 392 | 395 |
return -1; |
| 393 | 396 |
} |
| 394 |
- CfTickCnt = 1; |
|
| 397 |
+ CfTickCnt = CF_POWERUP_TIME; |
|
| 395 | 398 |
while (CfTickCnt > 0) |
| 396 | 399 |
Tasks(); |
| 397 | 400 |
|
| 398 | 401 |