SD filesystem April 22, 2010 12:58AM | Registered: 15 years ago Posts: 444 |
int getLevels(){ if(!fatInitDefault()){ return 1; } Level levelinfo; FILE *fp = fopen("SD:/gravitii.lvl","rb"); if(fp != NULL){ /*Some Code*/ } else return 1; return 0; }I know that fat is initializing because when I comment out these lines:
//if(fp != NULL){ /*Some Code*/ //} else return 1;The function returns a 0, If they are present then fp is NULL and the code quits. Also I have double checked that the file exists and that a SD in not in the locked position
DIR_ITER *root = diropen("SD:/"); if (root) { dirclose(root); return true; } return false;
Re: SD filesystem April 22, 2010 02:31AM | Registered: 14 years ago Posts: 234 |
Re: SD filesystem April 22, 2010 02:48AM | Registered: 15 years ago Posts: 444 |