I'm writing a "factory reset" function for my TM4C123G application. Part of the reset will be to erase everything on the SD card.
The function shouldn't have previous knowledge of what is on the card.
Unfortunately f_unlink doesn't have a recursive option, so to unlink everything it looks like I would have to do a depth first search of the file structure, unlinking one by one.
I'm hoping to use f_mkfs to just reformat the file system. However the example code (http://elm-chan.org/fsw/ff/en/mkfs.html)
/* Create FAT volume with default cluster size */ res = f_mkfs("", 0, 0);
Doesn't compile. I'm assuming `f_mkfs(0,0,0);` is what I want.
Does this seem like a reasonable way to reset the SD filesystem?