To fix the hang problem
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: cdms_sd.h
- Revision:
- 191:0636c8391407
- Parent:
- 174:44a6d7c7674c
- Child:
- 193:f76b475d7807
--- a/cdms_sd.h Sun Jun 26 12:46:51 2016 +0000 +++ b/cdms_sd.h Tue Jun 28 08:22:08 2016 +0000 @@ -90,7 +90,7 @@ uint32_t fsc; uint8_t buffer[512]; int b=disk_read(buffer, SD_MNG_SECT); - if(sid==0x0) + if(sid==0x1) { fsc=(uint32_t)(buffer[0]<<24)+(uint32_t)(buffer[1]<<16)+(uint32_t)(buffer[2]<<8)+(uint32_t)buffer[3]; @@ -102,7 +102,7 @@ buffer[511]+=2; disk_write(buffer,SD_MNG_SECT); } - if(sid==0x1) + if(sid==0x2) { fsc=(uint32_t)(buffer[4]<<24)+(uint32_t)(buffer[5]<<16)+(uint32_t)(buffer[6]<<8)+(uint32_t)buffer[7]; uint32_t next_fsc=fsc+1; @@ -113,7 +113,7 @@ buffer[511]+=2; disk_write(buffer,SD_MNG_SECT); } - if(sid==0x2) + if(sid==0x3) { fsc=(uint32_t)(buffer[8]<<24)+(uint32_t)(buffer[9]<<16)+(uint32_t)(buffer[10]<<8)+(uint32_t)buffer[11]; uint32_t next_fsc=fsc+1; @@ -124,7 +124,7 @@ buffer[511]+=2; disk_write(buffer,SD_MNG_SECT); } - if(sid==0x3) + if(sid==0x4) { fsc=(uint32_t)(buffer[12]<<24)+(uint32_t)(buffer[13]<<16)+(uint32_t)(buffer[14]<<8)+(uint32_t)buffer[15]; uint32_t next_fsc=fsc+1; @@ -135,7 +135,7 @@ buffer[511]+=2; disk_write(buffer,SD_MNG_SECT); } - if(sid==0x4) + if(sid==0x5) { fsc=(uint32_t)(buffer[16]<<24)+(uint32_t)(buffer[17]<<16)+(uint32_t)(buffer[18]<<8)+(uint32_t)buffer[19]; uint32_t next_fsc=fsc+1;