Ok, now we're getting somewhere. The Chan FAT system is now giving me an "invalid path name" result.
I need to know what format the mbed FileSystemLike puts the dir name in when the virtual mkdir function is called. Then I can figure out how to reformat it to suit the Chan FAT.
I cannot find docs on this, so I'm going to trial and error it to find out.
Thanks for the help man.
--edit--
I figured out how to fix the formatting issue; FileSystemLike passes in a "/" in the beginning of the path when passing a directory name. It's confusing because it does not do this for file names.
Just one last bug to fix before the system is complete, it was discovered while trying to fix the path formatting
Is the FileSystemLike virtual method "rename" broken? No matter what I try, it will not execute my block of code and will only return -1. Has anyone else had this problem?
The declaration in the header file is
virtual int rename(const char* oldname, const char* newname);
The definition is
int FATFileSystem::rename(const char* oldname, const char* newname)
{
char OldName[64];
sprintf(OldName, "%d:/%s", FileSystemID, oldname);
if (f_rename((const TCHAR*)OldName, (const TCHAR*)newname))
{
return -1;
}
else
{
return 0;
}
}
Hello, I'm working on a data-logging system for an aerospace application. Here is what I have so far:
Started with standard, low-capacity SDcard and built a program to power up, initialize, write some dummy data, then read that data and printed to my computer. I've now moved up through some cards and accomplished this with a 4GB microSDHC. The next challenge is to learn how to use the FATFileSystem.
I can't seem to find answers to my questions anywhere on the site. I noticed the library isn't anywhere to be found except through searching the compiler's importer, and even then there isn't much information on it. Would it be possible to see the header file? A list or description of the members would be helpful.
I'm also trying to figure out how the FAT blocks mesh with the SD blocks so I can set the correct size during initialization, I don't want to waste any space. How do I tell the FAT system what sized blocks to use?