Changeset 507

Show
Ignore:
Timestamp:
04/12/07 18:01:12 (3 years ago)
Author:
anthony_rowe
Message:

Support for slower MMC cards

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/hal/lpc2106-cmucam3/mmc_hardware.c

    r493 r507  
    394394static uint8_t getWriteResultCode (void) 
    395395{ 
    396   int count = 60000l; 
     396  unsigned int count = 100000; 
    397397  uint8_t result = 0; 
    398   while (result == 0 && --count) 
     398  while (result == 0 && count>0) 
     399  { 
    399400    result = spiGetByte (); 
     401    count--; 
     402  } 
    400403  return result; 
    401404} 
     
    435438    spiPutByte (0xff); 
    436439    spiPutByte (0xff); 
     440     
    437441    // next we see if all went well. 
    438442    result = spiGetByte ();