INOS
|
The SDCard driver and FAT file system library can be enabled in the iDev project properties under the feature settings:
The functions are modelled after the standard's open/close/read/write/gets etc functions. However they all start with a 'f_' prefix to not get confusion with the internal system functions. Please see the FatFS documentation for a deeper explanation of the functions.
The documentation of the FAT library and its functions is available under FatFS
To use the FAT library include its header. It's not necessary to use the ifdef around it. However like that it's easier to disable the code if the application is also used on a target without an SDCard.
This example walks through all directories and prints the found items.
This example opens a file for reading and dumps the text lines as eventlog traces.
This example opens a file for writing and writes a string into it. The file can then be read on a normal computer with a card reader.
More examples are in the FatFS documentation. See the application note, "Extended Use of FatFs API".