FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - forcetronics

Pages: [1]
1
Discussion - Software / Trouble appending data to an existing file
« on: August 11, 2018, 05:48:39 PM »
Hello,

I am trying to append data or text to an existing file. I am able to open the existing file but I always write over the existing data instead of appending new data to the existing data. See my code below. Do I need to use a function like "f_lseek" to change the writing position of the file? Any help would be appreciated.

Here is how I open the file:
res = f_open(&f, EXAMPLE_FILE, FA_WRITE | FA__WRITTEN | FA_OPEN_EXISTING/*| FA_CREATE_NEW*/);

Here is the function used to write data:
f_write(&f, data, towrite, &written);

Pages: [1]