cancel
Showing results for 
Search instead for 
Did you mean: 

use std::fstream for SDCARD

Kvang
Associate III

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

 

 

 

 

 

1 REPLY 1
Kvang
Associate III

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