This example presents the functionality of the Experimental: Flash Data Storage library.
Two example projects are available for each supported board: with and without the SoftDevice.
After starting the example, it prints some information about the status of the file system, such as the number of pages available, the number of records present, or the number of dirty records.
Then, the example attempts to locate a dummy configuration record. If it is found, the record is updated. Otherwise, a new record is created. The key of the record is 0x7010
and it belongs to the file 0xF010
.
This example uses the Command Line Interface library to receive user input and to display information about the result and status of the operations.
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\peripheral\flash_fds
Test the Flash Data Storage Example application by performing the following steps:
print
: Print the list of records or the contents of the configuration file.write
: Write a record to flash.delete
: Delete a record from flash.update
: Update the configuration record.delete_all
: Delete all records.gc
: Run garbage collection.stat
: Print file system statistics.