I need to store persistent data of ~50 configuration bytes which will be written on command and loaded automatically on power up. So I am using FDS and writing just the one file / record.
Obviously when the product first powers up the flash will be blank, so the record need to be created. Subsequently the record need to be updated.
I'm not sure the bahaviour of the create / update functions:
If I update a record whch doesn't exist, will it be created anyway?
I noticed during development that I run multiple fds_record_write with the same file ID & record keys I get duplicated records (OK with different record IDs). Which one would be returned by the find function?
So my question is basically: Do I need to search for, then create or update my record? Or can I use fds_record_update for example to create then update which would make things a lot simpler.