Hi everyone.
I'm having a trouble with the F_lseek function of the tiva c fat library, when i go to another line the previous line is filed with trash.
This is my code:
FIL fil;
uint32_t count =8*515;
f_open(&fil, "testfile.txt", FA_OPEN_ALWAYS|FA_WRITE);
f_write(&fil, "Line1", 5, &count);
f_close(&fil);
f_open(&fil, "testfile.txt", FA_OPEN_ALWAYS|FA_WRITE);
f_lseek(&fil,1024); //moves the file pointer to the 2nd line
f_write(&fil, "Line2", 5, &count);
f_close(&fil);
f_mount(0, NULL);
with this code i get this txt file:
Line1 v v v ´v Äv Ðv Üv
Line2
Thanks for your help.