Hi,
How do I copy data from one fat partition to another fat partition in esp idf?
Thank you,
Regards,
copy data from one partition to another one
-
- Posts: 33
- Joined: Fri Oct 29, 2021 11:20 pm
-
- Posts: 9711
- Joined: Thu Nov 26, 2015 4:08 am
Re: copy data from one partition to another one
I don't think there's a function for that, but you can do it manually. Pseudo-code:
Code: Select all
f1=fopen(src, "r");
f2=fopen(dst,"w");
while(!feof(f1)) {
char buf[BUFLEN];
int rlen=fread(buf, 1, BUFLEN, f1);
fwrite(buf, 1, rlen, f2);
}
fclose(f1);
fclose(f2);
Who is online
Users browsing this forum: Bing [Bot] and 84 guests