use std::fstream for SDCARD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-09-10 6: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
- Labels:
-
FatFS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
