On 03/03/2016 10:20 PM, Nitin Bhosale wrote: > Hi > > We were attempting to use test_onefile.c based approach > (http://www.sqlite.org/src/doc/trunk/src/test_onefile.c). This is for > embedded where filesystem is not available. > This code works and we can create, insert, select on the database created > using this test_onefile.c. > > However we want to save the db to flash and saw that we should be > implementing below functions but didn't find any relevant information about > it. > > ** mediaRead(); - Read a 512 byte block from the file. > ** mediaWrite(); - Write a 512 byte block to the file. > ** mediaSync(); - Tell the media hardware to sync. > > I have few questions about it. If you answer them it would be really valuable > information for us. > 1. Signature for these functions with meaning of the argument 2. After > writing the above functions to behave as expected, how to integrate it with > rest of the code? > 3. As per our understanding we have to just write above 3 functions and we > are done. Is this understanding correct?
That is what it says. But it looks like the code is out of sync with the comments. I think you'll need to update fsRead(), fsWrite() and fsSync() to work with the media instead of a file-system file. And fsOpen() to initialize it. Dan.