Subversion Repositories NaviCtrl

Rev

Rev 24 | Rev 41 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 24 Rev 27
Line 599... Line 599...
599
       
599
       
600
                        c_size = ((u32)(SDCardInfo.CSD[7] & 0x3F))<<16; //CSD[07] -> [71:64]
600
                        c_size = ((u32)(SDCardInfo.CSD[7] & 0x3F))<<16; //CSD[07] -> [71:64]
601
                        c_size |= ((u32)SDCardInfo.CSD[8])<<8;                  //CSD[08] -> [63:56]
601
                        c_size |= ((u32)SDCardInfo.CSD[8])<<8;                  //CSD[08] -> [63:56]
602
                        c_size |= (u32)SDCardInfo.CSD[9];                               //CSD[09] -> [55:48];
602
                        c_size |= (u32)SDCardInfo.CSD[9];                               //CSD[09] -> [55:48];
603
                        SDCardInfo.Capacity = (c_size + 1)* 512L * 1024L;
603
                        SDCardInfo.Capacity = (c_size + 1)* 512L * 1024L;
604
                        break;
-
 
605
       
604
                        break; 
606
                default: //unknown CSD Version
605
                 default: //unknown CSD Version
607
                        SDCardInfo.Capacity = 0;
606
                        SDCardInfo.Capacity = 0;
608
                        break; 
607
                        break; 
Line 609... Line 608...
609
                }
608
                }
Line 634... Line 633...
634
                //SerialPutString("\r\nNo Card in Slot.");
633
                //SerialPutString("\r\nNo Card in Slot.");
635
                SSC_Deinit();
634
                SSC_Deinit();
636
                SDCardInfo.Valid = 0;
635
                SDCardInfo.Valid = 0;
637
                result = SD_ERROR_NOCARD;
636
                result = SD_ERROR_NOCARD;
638
        }
637
        }
639
        if(result != SD_SUCCESS)                SerialPutString("nok");
638
//      if(result != SD_SUCCESS)                SerialPutString("nok ");
Line 640... Line 639...
640
 
639
 
641
        return(result);
640
        return(result);