2024-09-10 06:17 AM
Hi
I'm trying to reuse some code that uses use std::fstream for file access.
I have the FATFS working and can read and write files. like this:
fr = f_open(&fil, path, FA_WRITE | FA_CREATE_ALWAYS);
if (fr == FR_OK) {
// Write text to the file
fr = f_write(&fil, text, strlen(text), &bw);
Is it possible to get std::fstream to work in this environment?
Or is it just too much hassle?
Kristian Vang
2024-09-11 10:54 PM
Hi
I'm trying to reuse some code that uses use std::fstream for file access.
I have the FATFS working and can read and write files. like this:
fr = f_open(&fil, path, FA_WRITE | FA_CREATE_ALWAYS);
if (fr == FR_OK) {
// Write text to the file
fr = f_write(&fil, text, strlen(text), &bw);
Is it possible to get std::fstream to work in this environment?
Or is it just too much hassle?
Kristian Vang