I am using the FATFS library in flashee-eeprom on P1. From this example, I was able to create a FATFS of 1 MB size, create a file, write to a file, read from the file and finally delete the file.
I have questions about the read API which is,
((fr=f_read(&fil, buf, sizeof(buf), &dw))==FR_OK);
From what I understood, this API reads the data from the file pointer fil and writes the data to buf array. But I want to read line by line based on the terminating character. How do I do this?
How do I append data to the existing file? This API,
((fr=f_write(&fil, message, strlen(message)+1, &dw))==FR_OK);
writes the message buffer to the fil object. How do I add more data to the same file object? I want to invoke this f_write in a loop so that the data gets added to the same file.