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:

"

  1. include "mbed.h"
  2. include "SDFileSystem.h"
  3. include "DS1820.h"
  4. 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"); } "

Be the first to answer this question.