Hi all,
I have some questions regarding the use of FDS. I understand that every record is assigned a key and file ID. I manage to get basic delete, read and write functions to work.
Assuming that I am using the following:
fileID = 0x1000; recordKey = 0x2000;
When I create a new record using fds_write(), I get the following log information:
APP: INFO: Writing Record ID = 1
Using the same fileID and recordKey, I can read what I have written into Flash Memory.
However, when I try to issue the following commands:
- fds_write()
- fds_read()
- fds_delete()
- fds_write()
- fds_read()
The first 1st fds_write creates a Record ID =1. And I can read back successfully. When I call fds_delete, the log gives "Deleted Record ID: 1". And the subsequent fds_write with some new different data now creates a Record ID = 2. But Record ID 1 has already been deleted, so why is a Record ID 2 created instead of Record ID 1? And when I try to call a fds_read() using the same fileID and RecordKey, it reads back the old data from Record ID 1 (even though its been deleted).
I am basically trying to update the record with new data, and the function fds_update gives the problem as above.
Any one can help?