Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 5 months ago.
SDFileSystem errors
I have an issue where the sdfilesystem works some times and fails to compile other times.
The error I get is the following:
Warning: Overloaded function "mbed::FileSystemHandle::open" is hidden by "FATFileSystem::open" virtual function override intended? in "SDFileSystem/FATFileSystem/FATFileSystem.h", Line: 49, Col: 26
My code is the following:
"
- include "mbed.h"
- include "SDFileSystem.h"
- include "DS1820.h"
- include "time.h"
InterruptIn button(USER_BUTTON); DigitalOut redLED(D7); DS1820 aa('B',PC_6); DS1820 bb('B',PC_8);
Serial pc(USBTX, USBRX); SPI device(D11,D12,D13);
SDFileSystem sd(PB_15, PB_14, PB_13, PB_12, "sd",PA_8, SDFileSystem::SWITCH_NONE,25000000);
void wHandlr() { pc.printf("Hello World, in handlr!\r\n"); FILE *fp = fopen("/sd/mydir/sdtest.txt", "a+"); if(fp == NULL) { error("Could not open file for write\n"); } fprintf(fp, "Hello fun SD Card World!\r\n"); fclose(fp); }
int main() { pc.printf("Hello World, in main!\r\n"); mkdir("/sd/mydir", 0777); wHandlr();
pc.printf("Goodbye World!\r\n"); } "