You are viewing an older revision! See the latest version
SD Card File System
An library to allow SD Cards to be accessed as a filesystem, using a SPI interface.
Hello World!¶
main.cpp
#include "mbed.h"
#include "SDFileSystem.h"
SDFileSystem sd(p11, p12, p13, p27, "sd");
int main() {
printf("Hello World!\n");
FILE *fp = fopen("/sd/sdtest.txt", "w");
if(fp == NULL) {
error("Could not open file for write\n");
}
fprintf(fp, "Hello fun SD Card World!");
fclose(fp);
}
Library¶
The SDFileSystem library, for accessing SD Cards using fopen, fprintf, etc.
Reference¶
- Notes on the development of this library: SDCards!